The Script Block

The statements in the script block are executed only when the action trigger becomes true. When this happens, the script statements are executed once, in the order in which they appear.

Remember that if a destination state is specified, the current state will be stopped prior to the script executing, so none of the statements in the script should depend on any of the other statements outside of the script being active (such as database functions requiring an active DBSystem statement).

Any number of statements may be present in a script, including none. The only limitation upon the number of statements in a script is the available memory (RAM).

Not all of VTS's functions can be used within a script. For example, graphic functions may not appear inside scripts. Module calls are allowed inside scripts, but the modules are then considered implicitly "launched" (see Launched Modules for the implications of launching a module).

There is one exception to the rule about scripts being executed in their entirety - that is, if the module that contains the script is launched and the script contains a Slay statement, the module will immediately be stopped and the script execution along with it.