Please enable JavaScript to view this site.

ESL Documentation

If you want ESL to leave any block, except a guarded block, in response to a specified stimulus and then return control to that block immediately after the response has been executed, specify the keyword interrupt in the response definition. Note that specifying an interrupt response within a block itself serves no purpose, unless the block contains other (nested) blocks.

 

When an interrupt response occurs, ESL first finishes any action statements in the current response, then executes the actions in the interrupt response, and finally returns to the block and awaits a stimulus from within that block. An interrupt response affects all blocks except guarded blocks. You cannot use an interrupt response statement for the response to start, response to low memory, or response to termination response definitions.

 

In the example below, if the user selects Menu1, then YesKey, and then selects Menu3, the Menu3 response will first wait until the response to YesKey response statement has finished, then execute the response to Menu3, and last, return to the YesNo block and await a stimulus.

 

response to Menu1

    begin YesNo

        response to YesKey

            ...

        response to NoKey

            ...

            leave block YesNo

    end YesNo

 

interrupt response to Menu3

    make object blue

 

response to Menu4    # If user selects YesKey and

    ...             # then Menu4, control will NOT

                     # be returned to the Menu1 block.

 

If you want ESL to leave a specified block in response to any stimulus defined in an outer (nested) block, see Leaving (Exiting) a Block.