Skip to content

Constants

  1. Always start with a letter.

  2. Only uppercase letters from A to Z.

  3. Numbers from 0 to 9.

  4. Word separator _.

  5. 🐍 Screaming snake case.

    CONSTANT_NAME
  6. ❗ If the constant is related to Safety, the name starts with F_:

    F_CONSTANT_NAME
VAR_CONSTANT
// ✅ Correct:
CMD_FFFF_NIL : int := -1; // Null command
STATE_0_INIT : int := 0; // Init. state
PROV_FALSE: bool := false; // Provisional false
PROV_TRUE: bool := true; // Provisional true
STATUS_0_DONE: int := 0; // Status 0
END_VAR
VAR_CONSTANT
// ❌ Wrong:
cmd_-1_nil : int := -1; // Null command
State_0_Init : int := 0; // Init. state
provFalse: bool := false; // Provisional false
ProvTrue: bool := true; // Provisional true
int_status_0_done := int := 0; // Status 0
...
END_VAR