Skip to end of metadata
Go to start of metadata

The ACTION instruction creates an action.

Syntax

[ACTION] name [caption] [(param1, ..., paramN)] { operator } [options];
[ACTION] name [caption] [(param1, ..., paramN)] contextIndependentOperator [options];

Description

The ACTION instruction declares a new action and adds it to the current module.

The instruction has two forms: the first form creates an action using a context-dependent action operator, the second form creates a context-independent one.

Also, when declaring an action, a set of its options can be specified.   

Parameters

name 

Action name. Simple ID.

caption

Action caption. String literal. If no caption is defined, the action name will be its caption.  

param1, ..., paramN

List of parameters. Each of them is defined by a typed parameter These parameters can be later used in the action operator describing the action being created (as well as in some options).

If parameters are not defined explicitly, they will be automatically calculated when the operator is processed. The order of the parameters will match the order of their appearance in the operator. It is recommended to explicitly define action parameters. This will help find typos and other errors in the declaration (for example, a mismatch of the number of defined parameters with the number of parameters of the created action).

operator

A context-dependent action operator describing and creating an action. You can use the parameters defined in this instruction (if any) as operator parameters.

contextIndependentOperator

The context-independent action operator describing and creating an action. 

options

Action options

Examples

1
2
 showMessage  { MESSAGE 'Hello World!'; } 								// action declaration
loadImage 'Upload image'  ABSTRACT ( Item); 	

  • No labels