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

Main Program Section

This program section can contain the SCL statements that make up the main body of the program. These statements are contained within the keywords Begin and End and are executed sequentially.

The Main Section is only executed if the Simulation Control Program is started by the Run command. If started by Exec, this section is ignored and a warning message is issued.

After finishing the execution of the Main Section, execution is automatically switched to the interactive mode where a Continue command may be used to execute the default main (see below).

If the Main Section is omitted, the default main is executed. This default is a Go Extended in a continuous loop (until interrupted by the user):

BEGIN
WHILE TRUE LOOP
GO EXTENDED;
END LOOP;
END;