Conditionally returns one of two specified values.
function IfThen(AValue: Boolean; const ATrue: string; AFalse: string = ''): string; overload;
AnsiString IfThen(Boolean AValue, const AnsiString ATrue, AnsiString AFalse = '');
StrUtils
IfThen checks the expression passed as AValue and returns ATrue if it evaluates to true, or AFalse if it evaluates to false. In Delphi, if the AFalse parameter is omitted, IfThen returns 0 or an empty string when AValue evaluates to False.
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|