-initauto / -noinitauto

Determines whether the compiler initializes automatic variables without an INITIAL attribute and without a NOINIT attribute.

Syntax

-initauto [full|short]
-noinitauto

Behavior

-initauto full
Adds an initial attribute with a default value to all automatic variables according to its data type:
Variable Initialized to
FIXED

FLOAT

0 (zero)
PICTURE

CHAR

BIT

WIDECHAR

GRAPHIC

''
POINTER

OFFSET

SYSNULL()
ENTRY

ENTRY LIMITED

binary 0 (zero)

This is the default setting when -initauto is explicitly set.

CAUTION:
Setting -initauto full can be very expensive in terms of both code size and speed. Use this option with caution. As an alternative, consider using -initauto short instead.
-initauto short
Adds an initial attribute with a default value to automatic scalar variables only, for the following data types:
Variable Initialized to
FIXED BIN

FLOAT BIN

FLOAT DEC

POINTER

OFFSET

0 (zero)

BIT

CHAR(1)

VARCHAR(1)

''
Note: -initauto short is an abbreviated form intended to reduce negative affects on code size and speed that might occur when using -initauto full.
-noinitauto
The compiler does not initialize automatic variables without an INITIAL attribute and without a NOINIT attribute.

Default

-noinitauto

Comments

Programs having data items that are not explicitly initialized before first use are not considered to be technically correct.