Please enable JavaScript to view this site.

ESL Documentation

Action Routine Definition

Group a set of action statements into an action routine.

 

action ROUTINE_NAME is

[ACTION_STATEMENT] ...

 

ROUTINE_NAME

The identifier for an action routine.

 

ACTION_STATEMENT

An action statement.

Description

An action routine must be defined in every program in which it is to be used. The action routine can include any number of action statements and any type of action statements, even those that reference other action routines. This eliminates the repetition of any series of action statements.

You can reference an action routine inside the definition of another action routine. Action routines may also call themselves recursively. However, if you do this, be sure to set a condition that ends the recursion so that it does not create an infinite loop.

Example

action Startup is

enable Prompt

make Screen_GR visible

enable Keys

action StartFirst

action NextProgram is

make Everything invisible

make PleaseWait visible

change to program Restart

See Also

action Action Statement