Unit 'sysutils' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

IfThen

Return one of two values depending on boolean condition.

Declaration

Source position: sysutilh.inc line 291

function IfThen(

  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.


Documentation generated on: Dec 26 2024