Declarations

Every TCL script begins with some declarations (otherwise there is nothing that the script can manipulate).

The declarations part of a TCL script can include any of the following sections, in any order:

Constants
Gives names to commonly used values such as defining that 'normal' might take the value 0, and 'reverse' the value 1.

Sensors
How inputs are wired, and what the input lines are called.

Controls
How outputs are wired, and what the output lines are called.

Variables
What variables are used within the script.

SmartCabs
Any computer controlled throttles are declared here.

qKeys
Buttons in the qKeys window that can control the script.

strings
How string variables are declared and used.

QtuCabs
How QTUs are declared and used.

qtuconfigs
Which configuration file is used by each QTU.

Trains
How Train objects are declared and used.

Back to scripting page.

Last updated 13 Apr 2008

© Howard Amos 2004-2009