BOOLEAN Declaration

A BOOLEAN declaration declares simple variables that can have Boolean values of TRUE or FALSE.

<Boolean declaration>

                                    ┌◄───────── , ────────┐
──┬───────────┬─┬───────┬─ BOOLEAN ─┴─┬─<identifier>────┬─┴────────────┤
  ├─ PRIVATE ─┤ └─ OWN ─┘             └─<equation part>─┘
  └─ PUBLIC ──┘

The PRIVATE and PUBLIC specifiers can only be used for simple variables that are declared within a structure block or a connection block. The PRIVATE specifier limits visibility of the simple variable to the scope of the structure block or the connection block. A PRIVATE simple variable cannot be accessed using a structure or connection block qualifier. The PUBLIC specifier allows the simple variable to be accessed using a structure or connection block qualifier. If neither PRIVATE nor PUBLIC is specified, the default value is PUBLIC and access to the simple variable using a structure or connection block qualifier is allowed.

A simple variable declared with the OWN specification retains its value when the program exits the block in which the variable is declared. The value of that variable is again available when the program reenters the block in which the variable is declared.

<Boolean identifier>

An identifier that is associated with the BOOLEAN data type in a BOOLEAN declaration.