Variables contain an unknown, random value when declared. Variables must be
initialized before they are used.
Array Initialization
For mats
int MyArray[10] = {1,2,3,4,5,6,7,8,9,10}
char LetterArray[6] = ‘MYWORD’
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:
Written As
Examples
Decimal constant
1234
short MyVal = 1234
Hexadecimal constant
0xFA20
short MyVal = 0xFA20
ASCII code (character constant)
‘ABCD’
char String[4] = ‘ABCD’
Boolean: True (not zero), False (zero)
True, 1, False, 0
bool Done = 0, or, bool Done = False
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
Else
next
Then
bool
End
not
To
Break
False
Or
True
BIN
float
return
void
BCD
For
select
wend
char
GetData
SetData
While
Continue
If
short
xor
down
int
Step
Operator
Below is a list of the recognized operators.
Group
Name
Sym
Assignment:
=
Assignment operator:
Addition:
+
Subtraction:
-
Multiplication:
*
Division:
/
Modulo:
%
Comparison operators:
Less than:
<
Less than or equal
to:
<=
Greater than:
>
1010-1007, Rev 05
Macros
247
Summary of Contents for Silver Plus Series
Page 20: ...1010 1007 Rev 05 16 Silver Plus Series Installation Operation Manual ...
Page 31: ...COM Ports for the HMI5056 5070 1010 1007 Rev 05 Connect the OIT to the PLC or Controller 27 ...
Page 38: ...1010 1007 Rev 05 34 Silver Plus Series Installation Operation Manual ...
Page 49: ...7 Click the Shape tab 1010 1007 Rev 05 Creating Your First Project 45 ...
Page 62: ...1010 1007 Rev 05 58 Silver Plus Series Installation Operation Manual ...
Page 75: ...3 Click OK The System Parameter Settings dialog appears 1010 1007 Rev 05 Using EZware 5000 71 ...
Page 132: ...1010 1007 Rev 05 128 Silver Plus Series Installation Operation Manual ...
Page 156: ...1010 1007 Rev 05 152 Silver Plus Series Installation Operation Manual ...
Page 210: ...1010 1007 Rev 05 206 Silver Plus Series Installation Operation Manual ...
Page 216: ...1010 1007 Rev 05 212 Silver Plus Series Installation Operation Manual ...
Page 246: ...1010 1007 Rev 05 242 Silver Plus Series Installation Operation Manual ...