Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Expression types

&pagelevel(3)&pagelevel

The type of an expression is always identical to the data type of the result value. There are three types of expression, corresponding to the three data types:

  • arithmetic expressions

  • logical or Boolean expressions

  • string expressions

The type of a simple expression is determined by the operator that links together the base terms. The table below lists simple expressions and their components:

Type

Operators

Base terms

Result data type

Arithmetic expression

Arithmetic

Numbers
Variable names
Function calls

Integer

Relational expression

Relational

Numbers
Boolean constants
String literals
Variable names
Function calls

Boolean

Logical or Boolean
expression

Logical

Boolean constants
Variable names
Function calls

Boolean

String expression

Concatenation

String literals
Variable names
Function calls

String

For complex expressions, the data type of the result, and thus of the expression, is determined by the last operator to be evaluated. The order of precedence for operators and the way in which expressions are evaluated is described in the next section.