Skip to content

IfThen

Return one of two values, depending on a boolean condition

Declaration

Source position: math.pp line 628

  function IfThen(val: Boolean; const iftrue: Integer; 
                 const iffalse: Integer) : Integer;  Overload;
  function IfThen(val: Boolean; const iftrue: Int64; const iffalse: Int64)
                  : Int64;  Overload;
  function IfThen(val: Boolean; const iftrue: Double; 
                 const iffalse: Double) : Double;  Overload;

Description

ifthen returns iftrue if val is True, and iffalse if val is False.

This function can be used in expressions.