Chapter 5. Expressions

An expression is a sequence of operators and operands. This chapter defines the syntax, order of evaluation of operands and operators, and meaning of expressions.

5.1 Operators

Expressions are constructed from operands and operators. The operators of an expression indicate which operations to apply to the operands. Examples of operators include +, -, *, and /. Examples of operands include literals, fields, and expressions.

There are the following kinds of operators:

• Unary operators take one operand and use prefix notation such as -x.

• Binary operators take two operands and use infix notation such as x + y.

• Ternary operator. Only one ternary operator, ?:, exists; it takes three operands and uses infix notation (c? x: ...

Get The “Oslo” Modeling Language now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.