表示: Delphi
C++
表示設定
System.Math.IfThen
提供:XE2 API Documentation
Delphi
function IfThen(AValue: Boolean; const ATrue: Integer; const AFalse: Integer): Integer; function IfThen(AValue: Boolean; const ATrue: Int64; const AFalse: Int64): Int64; function IfThen(AValue: Boolean; const ATrue: UInt64; const AFalse: UInt64): UInt64; function IfThen(AValue: Boolean; const ATrue: Single; const AFalse: Single): Single; function IfThen(AValue: Boolean; const ATrue: Double; const AFalse: Double): Double; function IfThen(AValue: Boolean; const ATrue: Extended; const AFalse: Extended): Extended;
C++
extern PACKAGE int __fastcall IfThen(bool AValue, const int ATrue, const int AFalse = 0x0)/* overload */;
プロパティ
| 種類 | 可視性 | ソース | ユニット | 親 |
|---|---|---|---|---|
| function | public | System.Math.pas System.Math.hpp |
System.Math | System.Math |
説明
指定された 2 つの値のうち、条件に合う方を返します。
IfThen では、AValue として渡された式を調べ、その評価結果が True の場合は ATrue を、False の場合は AFalse を、それぞれ返します。Delphi では、AFalse パラメータが省略された場合、IfThen は、AValue の評価結果が False であれば、0 または空文字列を返します。