Reserved words

The following table lists words that have meaning in a TCL script. Presently all reserved words are reserved in all contexts so even though 'fill' can only occur inside a Draw Image action, its use anywhere else in a script is impossible.

In addition to the reserved words listed below, there is also the list of pre-defined colours here.

Method names are not reserved words - they are stored in a separate list.

->

Define destination for image move

{…}

A comment - ignored by the script loader

$loops

Variable holding number of times script has been looped through

$switch

Action to control turnout display aspect in CTC windows

$time

Variable holding layout time

Actions:

Begin the main body of the script

always

Begins a continuously running script statement

and

Adds another condition to a statement. Can be abbreviated to comma

background

Part of draw message action

brake_off

Compound means of controlling brake with speed, momentum and direction

brake_on

Compound means of controlling brake with speed, momentum and direction

color/colour block

Set colour of track line in CTC window

color/colour message

Set colour of text on CTC window

color/colour track

Set colour of track line in a CTC cell

Constants:

Begin defining the list of named constant values used in this script

Controls:

Begin defining the list of controls (stack outputs) used in this script

CtcText:

Begin defining the list of CTC text objects used in this script

CtcWindows:

Begin defining the list of CTC window-access objects used in this script

DbQueries:

Begin defining the list of database query objects used in this script

do

Separates a statements conditions from its actions

draw image

Add image to CTC window

draw message

Add text to CTC window

else

Part of IF...THEN...ELSE...ELSEIF...ENDIF

elseif

Part of IF...THEN...ELSE...ELSEIF...ENDIF

endif

Part of IF...THEN...ELSE...ELSEIF...ENDIF

endloop

Part of UNTIL...LOOP...ENDLOOP

endsub

End defining a subroutine

erase image

Remove an image from CTC window

erase message

Remove text from CTC window

FastClock:

Not presently implemented

fill

Part of draw image action

forward

Compound means of controlling direction with speed, momentum and brake

Group:

Controls debug window data organisation

if

Conditional action

left_mouse

Condition to detect left-button mouse clicks in CTC windows

loop

Part of UNTIL...LOOP...ENDLOOP

momentum_0 (..7)

(Obsolete) Compound means of controlling momentum in a SmartCab, Qtu or Train

move image

Move an image on a CTC window

or

Begin an alternative condition for a statement

position

Part of draw message action

Priorities:

Begin defining the list of priority objects used in this script

pulse

Action to pulse an output

Qkeys:

Begin defining the list of Quick Key buttons used in this script

QtuCabs:

Begin defining the list of QTU throttles used in this script

random

Magic variable that returns random numbers

realtime

Variable holding real clock time

return

Return from a subroutine

reverse

Compound means of controlling direction with speed, momentum and brake

right_mouse

Condition to detect right-button mouse clicks in CTC windows

rotate

Part of draw image action

send packet

Send ethernet packet

Sensors:

Begin defining the list of sensors (stack inputs) used in this script

session

Variable holding time Tcc has been running

size

Part of draw image or draw message actions

SmartCabs:

Begin defining the list of throttles controlled by this script

spare

Skip over an unconnected stack input or output pin

Strings:

Begin defining the list of string objects used in this script

struct

Defines a structure, only valid in Variables: declaration section

sub

Begin defining a subroutine

System

The name of the one pre-defined system object

TagReaders:

Begin defining the list of RFid reader hardware used in this script

temp1, temp2

The two pre-defined string variables

then

Part of IF...THEN...ELSE...ELSEIF...ENDIF

total count

Confirm number of pins used in stack input or output list

trace

Controls log window listing of following statements

Trains:

Begin defining the list of train objects used in this script

until

Part of UNTIL...LOOP...ENDLOOP

Variables:

Begin defining the list of regular variables used in this script

version

Used to skip the header in tcl.? files

wait

Action to pause a statement

when

Begins an edge-triggered script statement

while

Begins a level triggered script statement

Last updated 23 March 2011

© Howard Amos 2011