Enumerated types

<< 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.

Using enumerated types

<Enumeration type name>#<Literal name>

Example

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