The only Pascal way is

 left := IfThen(expr1, expr2, expr3)

Similar to addr(), sizeof(), length(), write() and recently added Default()
in intrinsic.
I guess functions declared in Math unit are not covering all the needs
(since type of expr2, expr3) may vary.
That's why a bit of compiler support is needed.

thanks,
Dmitry
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to