[fpc-devel] new features and facilities
skalogryz.lists at gmail.com
Fri Oct 9 20:45:26 CEST 2015
On Fri, Oct 9, 2015 at 2:30 PM, Michael Van Canneyt <michael at freepascal.org>
I'm not sure this kind of semantics is possible with a compiler intrinsic...
> But if it is: In that case the IfThen or IIF() or somesuch has my absolute
> top preference, followed by ternary. (and the If .. then expression should
> be blasted to hell ;) )
Here's an example:
a,b : integer;
assert(a=0, 'error: '+intTostr(b));
compiled with (2.6.4) fpc -al -Sa testassert.pas
Looking at the assembler code, a=0 is evaluated first.
If it's true, the code is passed to the next line after assert, w/o
evaluating 'error '+intToStr(b).
Looks like a good example of conditional intrinsic supported by compiler to
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-devel