System.Math.IfThen

提供: RAD Studio 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 DELPHI_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 または空文字列を返します。

関連項目