Specify values implicitly and explicitly

Expressions are composed of statements that include instructions, operators, and literals. You can use variables and names of objects. Together these elements are combined in the computation of a final value. In calculating the resulting value of the following expression, you can specify the value of an express in DML either explicitly or implicitly:

%pi := 3.14; %area := %pi * %radius * %radius; %height * %area

This example uses the implicit method: its value is %height * %area. The value of an expression is implicitly set by its last statement. This is correct only when the last statement generates a value: multiplication does, assignment does not.

To specify explicitly, use the reserved character $ that refers to the expression value. Writing $ := 4 in an expression means its actual value is 4.

Related Links