(* IFF Runtime Implements ?: operator available in C and in languages with similar syntax. C/C++, C# and others: x = i % 2 ? 1000 : 10; Delphi if I mod 2 = 0 then X := 1000 else X := 10; With IFFunctions Runtime: X := IFF(I mod 2 = 0, 1000, 10); or (Delphi 2010 and newer) X := IFF.Check(I mod 2 = 0, 1000, 10) Requirement: RTInternals.inc from Tembo (c) Tembo, 2012 All rights reserved. For non commercial usage only! http://tembolab.pl *) {$I RTInternals.inc} uses IFFunctions; procedure TForm1.FormCreate(Sender: TObject); begin {$IFDEF GENERICS} {$MESSAGE 'Used IFF class'} Caption := IFF.Check(CompilerVersion = 23, 'XE2', Format('<%.0f>', [CompilerVersion])); {$ELSE} {$IFDEF RT_MESSAGES}{$MESSAGE 'Used IFF overloaded function'}{$ENDIF} Caption := IFF(CompilerVersion = 23, 'XE2', Format('(%.0f)', [CompilerVersion])); {$ENDIF} end;