System.StrUtils.IfThen
Delphi
function IfThen(AValue: Boolean; const ATrue: string; AFalse: string = ''): string;
C++
extern DELPHI_PACKAGE System::UnicodeString __fastcall IfThen(bool AValue, const System::UnicodeString ATrue, System::UnicodeString AFalse = System::UnicodeString())/* overload */;
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
function | public | System.StrUtils.pas System.StrUtils.hpp |
System.StrUtils | System.StrUtils |
説明
2 つの指定された値の 1 つを条件に応じて返します。
IfThen 関数は,AValue として渡された式を調べ,その式の評価が true の場合に ATrue を返し,false の場合は AFalse を返します。Delphi では,AFalse パラメータを省略すると,IfThen は 0 を返すか,AValue の評価が False の場合は空の文字列を返します。