GDIM
SWDBC
The GDIM instruction defines a character string variable or an array of character string variables. If defining an array, any number of the array items may be initialized. The instruction uses one of the following formats:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Data Definition Label.
*
Optional. Denotes the item or file as being COMMON.
size
Required. A decimal constant or EQUATEd value indicating the variable size.
arraysize
Optional. An Integer decimal constant, CONST variable or equated value indicating the number of array items.
????
Optional. The initialization for the appropriate array, based on the order given.
Flags Affected: NONE
Note the following:
GDIM variables are blank filled unless an initialized array.
The Physical Length is set to the declared size while both the Length Pointer and Form Pointer are set to zero indicating a Null String. If the GDIM is an initialized array, the Form Pointer is set to one and the Length Pointer is set to the last character of the initialized contents (that may be less than the Physical Length) for each appropriate array item.
GDIM variables have the same rules and limitations as DIM variables when declaring Global Data Items.
The GDIM syntax format (5) is only supported when the SWDBC mode is enabled using the compiler (-zc=3) option. The {????} initialization for format (5) can be a string literal or a character literal.
See Also: Example Code, INIT, DIM, Character String Variables, Data Definitions
![]() |