- 1 Standard operators
- 2 Short-circuit control forms
- 3 Membership tests
- 4 See also
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.
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.
- Not Equal , (also special character /=)
- Equal , (also special character =)
- Less than , (also special character <)
- Less than or equal to ( ), (also special character <=)
- Greater than ( ), (also special character >)
- Greater than or equal to ( ), (also special character >=)
Binary adding operatorsEdit
- Add , (also special character +)
- Subtract , (also special character -)
- Concatenate , & , (also special character &)
Unary adding operatorsEdit
- Multiply, , (also special character *)
- Divide , (also special character /)
- modulus (also keyword mod)
- remainder (also keyword rem)
Highest precedence operatorEdit
Short-circuit control formsEdit
These are not operators and thus cannot be overloaded.
The Membership Tests also cannot be overloaded because they are not operators.
- element of, , e.g.
if I in Positive then, (also keyword in)
- not in
- not element of, , e.g.
if I not in Positive then, (also keywords not in)
Range membership testEdit
Subtype membership testEdit
Is_Non_Negative := X in Natural;
Class membership testEdit
Ada 95 Reference ManualEdit
Ada 2005 Reference ManualEdit
Ada Quality and Style GuideEdit