Please enable JavaScript to view this site.

ESL Documentation

An action routine is invoked with the action action statement. The specified routine must have been defined previously in the ESL program. When the routine is invoked, ESL performs the action statements specified in the routine, just as if the actions had been specified directly in the response definition. The routine name that you specify in an action statement can be either an ESL name or a string value. If a string value is specified, ESL converts this value using the string conversion rules.

 

In the following example, note that the name of the routine referenced by the action statement is extracted from the value returned by the parameter function. This function returns different values depending upon which key the user selects; for example:

 

response to KeyClass

extract from parameter # The parameter contains the

take word ActionName # name of an action

action ActionName      # routine.

 

You can invoke an action routine inside the definition of another action routine. However, you must ensure that an action routine does not invoke itself that is, the action statement inside the routine definition must not specify the name of the routine in which it is defined.