From Wikibooks, open books for an open world
Ada. Time-tested, safe and secure.Ada allows operator overloading for all standard operators and so the following summaries can only describe the suggested standard operations for each operator. It is quite possible to misuse any standard operator to perform something unusual.
Each operator is either a keyword or a delimiter—hence all operator pages are redirects to the appropriate keyword or delimiter.
Operators have arguments which in the RM are called Left and Right for binary operators, Right for unary operators (indicating the position with respect to the operator symbol).
The list is sorted from lowest precedence to highest precedence.
These are not operators and thus cannot be overloaded.
if Y /= 0 and then X/Y > Limit then ...
if Ptr = null or else Ptr.I = 0 then ...
The Membership Tests also cannot be overloaded because they are not operators.
if
I in
Positive then
, (also keyword in
)
if
I not
in
Positive then
, (also keywords not
in
)
if
Todaynot
in
Tuesday .. Thursdaythen
...
Is_Non_Negative := X in
Natural;
exit
when
Objectin
Circle'Class;
if
Todaynot
in
Tuesday .. Thursdaythen
...
This language feature has been introduced in Ada 2012.
Ada 2012 extended the membership tests to include the union (short-circuit or) of several range or value choices.
if
Todayin
Monday .. Wednesday | Fridaythen
...
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3