<< Click to Display Table of Contents >> Navigation: »No topics above this level« Enumerated types |
mapp Services V5.16
Enumerators are handled differently than with Automation Studio:
•Enumerated types are permitted to have literals with the same name as other enumerated types.
•Enumerated literals are not global constants.
•Using enumerated literals requires a type name prefix.
<Enumeration type name>#<Literal name>
TYPE
StateE : (
Init,
Running
);
END_TYPE
VAR
State : StateE;
END_VAR
PROGRAM _MAIN
CASE state OF
StateE#Init:
(* Statements *)
StateE#Running:
(* Statements *)
END_CASE
END_PROGRAM