System.Math.IfThen
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 */;
Propriétés
| Type | Visibilité | Source | Unité | Parent |
|---|---|---|---|---|
| function | public | System.Math.pas System.Math.hpp |
System.Math | System.Math |
Description
Renvoie, selon la condition, une des deux valeurs spécifiées.
IfThen teste l'expression transmise en tant que AValue et renvoie la valeur transmise dans ATrue si elle est évaluée comme True ou la valeur transmise dans AFalse si elle est évaluée comme False.