General script syntax information, General syntax of a script, Structuring a script – Visara Master Console Center Scripting Guide User Manual
Page 34: General syntax of a script structuring a script
![background image](https://www.manualsdir.com/files/808700/content/doc034.png)
Chapter 3 Script Syntax
Scripting Guide
34
General Script Syntax Information
General Syntax of a Script
The general structure of a script file is as follows:
// comments
// comments
PARMS var1, var2, ..., varN
statement
...
statement
//
comment
RETURN value
Structuring a Script
When writing scripts:
Any pre-defined MCC script item (for example, function, command, or
manifest constant) is a reserved keyword.
The script compiler is case insensitive except for string literals:
− $MyVariable is the same as $myvariable
− “IEF ERROR MSG” is different from “IEF Error msg”
Each part of a multi-part statement must be on a separate line. For
example, the following line is incorrect:
IF (%A < %B) %A := %B ENDIF
It must be split into three lines:
IF (%A < %B)
%A := %B
ENDIF
It is not required to assign return values from MCC functions or user
scripts to variables. If a return value is not assigned or is not used in
an expression, it simply disappears. However, ignoring return values
is not good programming.
Only one statement is allowed on each line (comments are not
considered statements).
The maximum number of characters per line is 2048.
The number of lines per script is unlimited.
The column starting position of each statement is optional. However,
we strongly recommend following a good program indenting standard
(for example, indenting steps, or IF logic).