Variable Initialization; Array Initialization; Reserved Words - Maple Systems Silver Series Installation And Operation Manual

Operator interface terminal
Hide thumbs Also See for Silver Series:
Table of Contents

Advertisement

Macros

Variable Initialization

Initialize a value of variable in the declaration statement directly. (e.g: int RPM = 75) Use the assignment operator
(=) to initialize a value to the variable. Variables can be declared and initialized in the following manor:
Stacked Example: Inline Example (separate like-types with a comma):

Array Initialization

For mats:
The initial values are written within the brackets {} and are divided by comma (,). These values are assigned in
order from left to right starting from array index=0.
Con stants:
A constant is a numeric or boolean value that does not change. Constants may be written as any of the following:
Decimal constant
Hexadecimal constant
ASCII code (character constant)
Boolean: True (not zero), False (zero)

Reserved Words

The following symbols and names are keywords that are reserved for use by macros. They cannot be used (as a
complete name) in any function name, array name, or variable name. However, the reserved words may be
contained within a variable name such as: my_int, TheEnd, etc.
And
bool
Break
Binaux
Binplc
Case
char
Continue
Character variable (8-bit unsigned)
Bool
Boolean variable (1-bit)
Variables inside macros are initialized to all '1's as a default (i.e. 0xFFFF), so don't
assume they are zero values when you enter the macro. It is good programming
practice to initialize variables during declaration, or use assignment statements before
they are used.
short a = 0
short b = 0
short c = 0
short a=0, b=0, c=0
Variables contain an unknown, random value when declared. Variables must be
initialized before they are used.
int MyArray[10] = {1,2,3,4,5,6,7,8,9,10}
char LetterArray[6] = 'MYWORD'
Written As
1234
0xFA20
'ABCD'
True, 1, False, 0
down
Else
End
False
float
For
GetData
If
Examples
short MyVal = 1234
short MyVal = 0xFA20
char String[4] = 'ABCD'
bool Done = 0, or, bool Done = False
int
next
not
Or
return
select
SetData
short
249
Step
Then
To
True
void
wend
While
xor
1010-1001a, Rev 02

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents