INTEGER Examples
Example 1:
|
|
|
|
WORKFLD is a one byte INTEGER with a possible value of 0 to 255 (0x0 to 0xFF).
Example 2:
|
|
|
|
WORKFLD1 is a one byte INTEGER with a possible value of zero to 255 (0x0 to 0xFF). It is placed in the Global Data Area.
Example 3:
|
|
|
|
WORKFLD is an INTEGER field whose size is undefined. It is placed in the Global Data Area. Before it may be used in a program, another program that defines the actual size must be CHAINed to or LOADMODed in order to define the variable.
Example 4:
|
|
|
|
TEMPFLD is a 4 byte INTEGER with an initialized value of 4,294,967,295 (0xFFFFFFFF).
Example 5:
|
|
|
|
|
|
|
|
|
|
|
|
The above example results in INT1 equaling 44 with the appropriate flags set.
Example 6:
|
|
|
|
|
|
|
|
INT1 is initialized as a 2 position INTEGER.
Example 7:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PTRINT is a Pointer Variable that contains the address of another INTEGER variable at execution time. This assignment is usually accomplished via the parameterized CALL instruction. Once initialized, PTRINT may be used as any other INTEGER variable. It takes on all the attributes of the pointed to INTEGER variable.
Example 8:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ARR1 is an integer array with three elements. Each element of the array may be accessed using array subscripting or by its label.
Example 9:
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This example illustrates use of the SWDBC compatibility mode of the compiler (-zc=3).
![]() |