Values can be assigned in an assignment statement or in a declaration.
The Assignment Statement (:=)
Values are assigned to variables with the assignment statement (:=). Unlike some languages, assignment is not an operator: it cannot be used in an expression.
Some types are "limited". This means they cannot be assigned using the assignment statement.
AdaScript expressions can contain the following operators:
The bitwise operators are identical to the boolean operators: SparForte choses which to use on the context of the expression.
in and not in test for membership in a range. (In Ada, the range can be a type but under AdaScript types have no bounds.) The range can be an pair of numbers, characters (not strings) or a pair of enumerated items.
=> b := green in red..blue;
in and not in are technically not operators.
Ada: and then and or else not yet implemented. Character ranges not yet implemented.
Expressions and Order of Operations
An expression is a combination of operands and operators used to compute a result value.
Expression operators are evaluated in the following order:
Subexpressions can be created using parantheses.
Assignment (:=) is a statement, not an operator, and cannot be used in expressions.
=> x := 5 * ( 7 + 2 );
|Back To Top|