execute/4—run a program as an external  process


The execute/4 primitive runs a program as an external  process.

execute($EVENT,$PROG,$ARGS,$ACTEVT)

execute/4 arguments

Argument

Mode

Type

Description

$EVENT

Input

OBJECT

Specifies the object handle for the event on which the action is to be performed

$PROG

Input

STRING

Specifies the name of the external program to be run

$ARGS

Input

LIST_OF ANY

Action argument list.

Required arguments for the program must be provided in the $ARGS list. The arguments are passed to the external program as command line arguments.

$ACTEVT

Input

STRING

YES|NO
Indicates whether or not to generate an action event.

Use execute/4 to run the program specified in the $PROG argument as an external process on the event with the object handle specified in the $EVENT argument. The program location is determined in the same manner as it is for actions. For more information, see Actions. The execute/4 call terminates immediately when the external process has been set up, even if the program is not yet finished. The remainder of the rule is executed.

The program is activated by using the slot name as environment variable name, in an environment that contains all the slots of the event. In addition, some system-defined variables are available.

If the $ACTEVT argument is specified as YES, an MC_CELL_ACTION_RESULT event will be created. On termination of the program, the MC_CELL_ACTION_RESULT event will be updated with the result.

execute/4 example

execute($E,mc_modslot,[msg,'Hello'],NO);

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*