185
14.3.3 Reserved Keywords
The following keywords are reserved for Macro use. They cannot be used for variable, array, or function names.
+, -, *, /, %, >=, >, <, <=, <>, ==, And, Or, Xor, Not, <<, >>, =, &, |, ^, ~
If, Then, Else, End, Select, Case, For, To, Down, Step, Next, While, Wend, Break , Continue, Return, Sub, bool, char,
short, int, float
14.4 Statement Construction
Statement construction depends on the statement’s purpose. All statements begin on a new line.
14.4.1 Definition Statement
This covers the declaration of variables and arrays. The formal construction is as follows:
type name
type name[constant]
14.4.2 Assignment Statement
Assignment statements use the assignment operator to move data from the expression on the right side of the operator to
the variable on the left side. An expression is the combination of variables, constants and operators to yield a value.
Variable = Expression
14.4.3 Logical Statements
Logical statements perform actions depending on conditions. There are two types of conditional statements.
14.4.3.1 If-Then-Else Statements
These statements perform actions depending on the condition of a Boolean expression.
The Syntax is as follows:
Single Line format:
If <Condition> Then [statements] Else [statements]
Block format:
If <Condition> Then
[Statements]
Else
[Statements]
End If
Syntax description:
If
Must be used to begin the statement
<Condition>
Required. This is the controlling statement. It is FALSE when the condition evaluates to
0 and TRUE when it evaluates to 1.
Then
Must precede the statements to execute if the Condition evaluates to TRUE.
[
Statements
]
Statements to execute. These can include other If-Then-Else statements.
Else
Must precede the statements to execute if the Condition evaluates to FALSE.
End If
Must be used to end an If-Then-Else statement when it is entered in Block format.
Содержание MMI-1500
Страница 2: ...ii...