On 31.01.2016 16:14, Vojtěch Čihák wrote:
> what is difference in produced assembler between ifthen(); and classic
> if - then - else?

=== code begin ===

i := IfThen(x < 42, 32, 49);

=== code end ===

is equivalent to

=== code begin ===

if x < 42 then
  i := 32
else
  i := 49;

=== code end ===

That's in fact how the compiler handles this internally (with the added
benefit of nesting IfThen()s).

Regards,
Sven
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to