git-svn-id: trunk@39521 -
@@ -266,6 +266,8 @@ type
procedure AddTerminateProc(TermProc: TTerminateProc);
function CallTerminateProcs: Boolean;
+generic function IfThen<T>(val:boolean;const iftrue:T; const iffalse:T) :T; inline; overload;
+
Var
OnShowException : Procedure (Msg : ShortString);
@@ -801,3 +801,14 @@ begin
result:=ExecuteProcess(ToSingleByteFileSystemEncodedFileName(Path),ComLineA);
end;
{$endif}
+// generic ifthen..
+begin
+ if val then
+ Result := ifTrue
+ else
+ Result:=ifFalse;
+end;