Expressions

index
BASIC

An expression is a way of describing a value.

The simplest expressions are literals, in which the value is explicitly written. For example,

Almost equally simple are variables which have been assigned a value. For example, x might be a variable, the type of which is given in some previous declaration.

Numeric literals and variables may be combined into arithmetic expressions, for example, 25 + x.

Boolean literals and variables may be combined into boolean expressions, for example hot && sunny. Certain arithmetic expressions result in boolean values, for example x < y, and these may be incorporated into boolean expressions. Boolean expressions are used as conditions.

Expressions involving objects may result in any type of value, depending on the expression.