<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>In defense of ternary operator:<BR>Ada 2012 has equivalent of C/C++'s ternary operator:<br>e.g.<br> sign := if a >= 0 then 1 else -1<BR> <BR><br>They'd rather people NOT do like:<br> sign := ORD(a >= 0) * 1 + ORD(a < 0) * -1<BR> <BR><br> <a href="http://www.adacore.com/uploads/technical-papers/Ada2012_Rationale_Chp2_expressions.pdf">http://www.adacore.com/uploads/technical-papers/Ada2012_Rationale_Chp2_expressions.pdf</a> <br><BR> "<font size="3" face="TimesNewRomanPSMT"><font size="3" face="TimesNewRomanPSMT">It should be remembered that the difficulties in C stem from a combination of things </font></font><BR><font size="3" face="TimesNewRomanPSMT"><font size="3" face="TimesNewRomanPSMT"> - That assignment is permitted as an expression, </font></font><BR><font size="3" face="TimesNewRomanPSMT"><font size="3" face="TimesNewRomanPSMT"> - That integer values are used as Booleans, </font></font><BR><p align="LEFT"><font size="3" face="TimesNewRomanPSMT"><font size="3" face="TimesNewRomanPSMT"> - That null statements are invisible. </font></font></p><font size="3" face="TimesNewRomanPSMT"><font size="3" face="TimesNewRomanPSMT">
<BR> None of these applies to Ada so all is well" <BR> <BR> Modula-3 is also safe from the first two, I don't know about the last. </font></font> - Jay<BR> </div></body>
</html>