User Tools

Site Tools

Navigation:  Language Reference > 5 - Declaration Attributes > Variable and Entity Attributes >====== AUTO (uninitialized variable) ====== Previous pageReturn to chapter overviewNext page


The AUTO attribute allows a non-static or non-threaded variable to be allocated uninitialized stack memory. Without the AUTO attribute, a numeric variable is initialized to zero and a string variable is initialized to all blanks when its memory is assigned at run-time.

The AUTO attribute is used when you do not need to rely on an initial blank or zero value because you intend to assign some other value to the variable. This saves a small amount of run-time memory by eliminating the internal code necessary to perform the automatic initialization for the variable.

When an ANY data type is declared outside of a structure, the AUTO attribute is ignored. When a structure containing an ANY has the AUTO attribute, you must first CLEAR the entire structure before you can access variables of type ANY.



SaveCustID LONG,AUTO     !Non-initialized local variable

See Also:

Data Declarations and Memory Allocation

auto_uninitialized_local_variable_.htm.txt · Last modified: 2021/04/15 15:56 by