Attribute ‘noinit’ΒΆ

This pragma is applied to variables that should not be implicitly initialized.

Syntax:

{attribute 'no_init'}

{attribute 'no-init'}

{attribute 'noinit'}

Insertion position: line above the declaration line of the variables concerned in the declaration part.

Example

PROGRAM PLC_PRG
VAR
 A : INT;

 {attribute 'no_init'}
 B : INT;
END_VAR

When the associated application is reset, the integer variable A is implicitly re-initialized with 0, whereas the variable B retains its current value.