Skip to content

Enumerations

  1. Always start with the uppercase letter E.

  2. Subsequent words start with uppercase letters.

  3. Do not use underscores _.

  4. Numbers from 0 to 9.

  5. 🐫 Pascal Case with a small variant, point 2.

    EName
  6. The elements of the enumeration follow the rules of constants.

  7. ❗ If the enumeration is related to Safety, the name starts with F_:

    F_EName
// ✅ Correct:
TYPE EStatus: INT // ← Name
(
IDLE := 0; // ← constant
REQUEST := 1;
BUSY := 2;
DONE := 3;
ERROR := 0x8000;
) := IDLE;
END_TYPE
TYPE ECommand:...
TYPE EData:...
TYPE EHmiCommand:...
TYPE EOperatingMode:...
// ❌ Wrong:
TYPE E_Status:...
TYPE enumStatus:...
TYPE e_status:...
TYPE EnumStatus:...
TYPE ENUM_status:...
...