Visara Master Console Center Scripting Guide Uživatelský manuál Strana 34

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 262
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 33
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).
Zobrazit stránku 33
1 2 ... 29 30 31 32 33 34 35 36 37 38 39 ... 261 262

Komentáře k této Příručce

Žádné komentáře