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

Constant Program Section

This program section consists of the CONSTANT keyword followed by the constant declarations for the Simulation Control Program. Constants are always local to the Simulation Control Program.

A constant declaration contains a type (integer, string, float, etc.) followed by assignment statements. Multiple assignments are separated by commas and the last assignment within the type is followed by a semicolon.

CONSTANT

INTEGER x:=5, y:=200, z:=1, z2:=10;

STRING alpha:=‘unexpected loop’,

beta:=‘enter action for yy’;

FLOAT A:=2.5, B:=700.234;

BIT B:=0;

BITARRAY (1..16)A2:=0xab37;

ARRAY (1..2) of STRING str:={‘Undefined action’,

‘Nonexistent’};

ARRAY (1..6) of INTEGER int: ={10,2,3,4,12,-72};