Sign in Join
FPDoc Onlineexperiment

IfThen function

In unit sysutils

Return one of two values depending on boolean condition.

Declaration

pascal
function IfThen<T>(val: Boolean; const iftrue: T; const iffalse: T): T
 ; overload

Description

IfThen returns iftrue if val is True, ifFalse if it is False. Note that both arguments will always be evaluated, so this does not behave like the conditional as found in some other languages.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.