You've already forked lazarus-ccr
First public commit
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@639 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
30
examples/germesorders/uutils.pas
Normal file
30
examples/germesorders/uutils.pas
Normal file
@ -0,0 +1,30 @@
|
||||
unit uUtils;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
function Iif(Cond:boolean; const TrueResult:String; const FalseResult:string):string;overload;
|
||||
function Iif(Cond:boolean; const TrueResult:integer; const FalseResult:integer):integer;overload;
|
||||
|
||||
function IfEmpty(const S:String; const ThenReplace:string):string;
|
||||
|
||||
implementation
|
||||
|
||||
function IfEmpty(const S:String; const ThenReplace:string):string;
|
||||
begin
|
||||
if S = '' then Result:=ThenReplace else Result:=S;
|
||||
end;
|
||||
|
||||
function Iif(Cond:boolean; const TrueResult:String; const FalseResult:string):string;overload;
|
||||
begin
|
||||
if Cond then Result:=TrueResult else Result:=FalseResult;
|
||||
end;
|
||||
|
||||
function Iif(Cond:boolean; const TrueResult:integer; const FalseResult:integer):integer;overload;
|
||||
begin
|
||||
if Cond then Result:=TrueResult else Result:=FalseResult;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user