Product Site

1.11.1. Terms and Expressions

Terms are literal strings, symbols, message terms and sequences, Array terms, Variable Reference terms, function calls, or subexpressions interspersed with zero or more operators that denote operations to be carried out on terms.

Literal strings, which are delimited by quotation marks, are constants.

Symbols (no quotation marks) are translated to uppercase. A symbol that does not begin with a digit or a period can be the name of a variable; in this case the value of that variable is used. A symbol that begins with a period can identify an object that the current environment provides; in this case, that object is used. Otherwise a symbol is treated as a constant string. A symbol can also be compound.

Message terms are described in Section 1.11.4, “Message Terms”, Message sequences are described in Section 1.11.5, “Message Sequences”.

Array terms are described in Section 1.11.6, “Array Term”.

Variable Reference terms are described in Section 1.11.7, “Variable Reference Term”.

Function calls (see Chapter 7, Functions), which are of the following form:

The function_name is a literal string or a symbol, which is taken as a constant. When it is a symbol, it can be optionally preceeded by a namespace followed by a colon.

An expression consists of one or more terms. A subexpression is a term in an expression surrounded with a left and a right parenthesis.

Evaluation of an expression is left to right, modified by parentheses and operator precedence in the usual algebraic manner (see Section 1.11.3, “Parentheses and Operator Precedence”). Expressions are wholly evaluated, unless an error occurs during evaluation.

As each term is used in an expression, it is evaluated as appropriate. The result is an object. Consequently, the result of evaluating any expression is itself an object (such as a character string).