If the set of built-in system methods, displayed in the model in the list called “Data Enhancement Methods,” does not contain a method to meet a particular requirement, the user can write the required method and add it to this list. A user-written method is called variously a “user method”, a “user procedure”, or a “named complex expression”. The Advanced User Guide describes how to construct a user-defined method.
The expression language supports a fairly complete set of programming statements which are compliant with the Java or C grammar for these statements, except as noted in Notes and Restrictions to the Grammar
-
The first statement must be a procedure statement. This contains the name of the procedure, a list of input arguments (a void argument list is acceptable), and a “returns” clause, which indicates the type of the return value.
-
Variable declaration statement, which supports an optional initializing statement
-
Assignment statement
-
if / else statement
-
switch / case / default statement
-
while statement
-
do statement
-
for statement
-
break and continue statements
-
return statement
-
Block statement where multiple statements can be grouped within left and right braces. Anywhere a single statement can be used, a block of statements can be specified.
-
Statements must be terminated with a semi-colon.
-
The last statement in a complex expression must be an end; statement.