I don't.
IIRC there's an Iff OVERLOADed function collection somewhere (sysutils?). If it isn't you can build it by your own.
Code:
FUNCTION Iff (CONST TheCondition: BOOLEAN; CONST Value1, Value2: REAL): REAL; OVERLOAD; INLINE;
BEGIN
IF TheCondition THEN RESULT := Value1 ELSE RESULT := Value2
END;
FUNCTION Iff (CONST TheCondition: BOOLEAN; CONST Value1, Value2: STRING): STRING; OVERLOAD; INLINE;
BEGIN
IF TheCondition THEN RESULT := Value1 ELSE RESULT := Value2
END;
Using VARIANT or generics would help too.
Anyway I'm not friend of borrow stuff from other languages. I like and use Pascal and Object Pascal as they were. If you like C# or Ada stuff then use C# or Ada.
Bookmarks