Batch Mode Simulation : The Simulation Control Program : The Structure Of The Simulation Control Program : Variable Program Section

Variable Program Section

This section is used to declare the local and global variables used by the SCP. Variables may be local to the Simulation Control Program or declared globally for use in multiple Simulation Control Programs. Global variables must be declared in each Simulation Control Program where they are referenced.

Each variable declaration has a type (integer, string, float, file, bit, array, Boolean or bit array) followed by variable names. Multiple variable names are separated by commas with the last name followed by a semicolon. Variables can be initialized.

VARIABLE
INTEGER xx, yy, u5:=5, za2;
STRING gamma;
GLOBAL STRING delta;
FLOAT aa, bb, cc, dd:=10.1879;
FILE f1, f2, f3;
BOOLEAN valid, invalid;
GLOBAL BOOLEAN correction;
BITARRAY (1..10) BA1;
BITARRAY (1..20) BA2;
BITARRAY (1..31) BA3;