Batch Mode Simulation : The Simulation Control Program : Basic Syntax Rules : Semicolons As Delimiters

Semicolons As Delimiters

Semicolons are used to separate Simulation Control Program statements. A semicolon optionally follows the last in a sequence of statements. This example uses semicolons only where required:

PROGRAM sample

VARIABLE FILE f1;

INIT

OPEN (f1,‘my_file.doc’,OUTPUT)

END INIT

SET BREAKPOINT analysis => [STEP] DO

WRITE (‘a will be greater than b \n’) ;

alpha := 200 ;

IF a<= b

THEN

alpha := 400 ;

st!(transfer) ;

a := 1 + b // optional semi-colon omitted

ELSE

sp!(counter)

END IF;

WRITE (f1,a,“\n”)

END BREAKPOINT

END.