5 system commands – ElmoMC SimplIQ Software Manual User Manual
Page 38

SimplIQ
Software Manual
4BThe
SimplIQ
User Programming Language
MAN-SIMSW (Ver. 1.4)
5-9
Example:
function func (int a)
Function definition
int b ;
Local
variable
definition
b = a ;
Executable
code
float c :
Local
variable
definition
return
The definition of the variable c is illegal because it comes after executable code.
The names of variables may include ASCII letters, digits (not leading) and underscores
(not leading) only. Variable names are case sensitive. The maximum variable name
length is 12 characters. A variable name cannot be a keyword.
The following is the list of keywords:
int otherwise
wait
float break until
if end goto
else return nargin
elseif function nargout
for global XOR
while exit
quit
switch virtual
DummyLabel
case reset try
clear catch this
leave cd
pw
save continue
All keywords are case sensitive.
Variable names must be distinct from function or label names.
After a program is compiled, all program variables may be used within the command line.
For example, assume that a compiled program includes the following lines:
int ZEBRA,GIRAFFE[3];
float GNU;
The expression GNU=ZEBRA*GIRAFFE[1]+2*sin(GIRAFFE[2]); is valid.
More information about global and local variables is given in
.
5.4.8.5 System Commands
The
SimplIQ
system commands (described fully in the
SimplIQ
Command Reference Manual)
consist of a two-letter mnemonic notation (only English letters, not case sensitive). For
example, the expressions ac = 100,000 and AC = 100,000 have the same meaning,
although the notation is different.
Each command has a 16-bit flag, each bit defining any feature. For example, the fourth bit
(PostProcess flag) defines whether the command can be used to set a value or not.