<< Click to Display Table of Contents >> Navigation: »No topics above this level« Actions |
mapp Services V5.16
Actions are treated as code macros.
Action declarations are stored in the current declaration scope. To declare global actions (like the actions in Automation Studio), the declaration scope should be first configured using pragma SCOPE.
Syntax errors when expanding action statements are reported as errors in the action declaration block. Semantic errors (for example, a reference to an unknown identifier) would be reported at the position of the action call.
ACTION init:
state := State#wait;
END_ACTION
PROGRAM _MAIN
init;
END_PROGRAM
This action is expanded into two different contexts: The "speed" is considered a return value in the first case and a local variable in the second case.