Hinweis:Dieser Abschnitt ist nur in englischer Sprache verfügbar. Wir bitten um Ihr Verständnis.

2.3.1.2.5 Order of Evaluation in Statements

When a script is executed, it is sent to the LabTalk interpreter and evaluated as follows:

The script is broken down into its component statements

Statements are identified by type using the following recognition order: assignment, macro, command, arithmetic, and function. The interpreter first looks for an exposed (not hidden in parentheses or quotation marks) assignment operator. If none is found, it looks to see if the first word is a macro name. It then checks if the first word is a command name. The interpreter then looks for an arithmetic operation, and finally, the interpreter checks whether the statement is a function.

The recognition order can have significant effect on script functions. For example, the following assignment statement:

type = 1;

assigns the value 1 to the variable type. This occurs even though type is (also) a LabTalk command, since assignments come before commands in recognition order. However, since commands precede arithmetic expressions in recognition order, in the following statement:

type + 1;

the command is carried out first, and the string, + 1, prints out.

The statements are executed in the order received, using the following evaluation priority