Data Definitions
PL/B supports three variable types: character string, ASCII numeric, and integer fields. All numeric instructions require numeric data definitions and most string instructions must use only character data definitions. Data may be moved between the different field types although certain rules may apply regarding format, truncation, and rounding.
|
Define data items passed between programs. | |
|
Define data items passed between programs. | |
|
Define character or numeric variable arrays. | |
|
Define variable or object pointers. | |
|
Define character variables. | |
|
Define national character variables. | |
|
Define character variable syntax. | |
|
Define character variable initialization. | |
|
Define numeric variables. | |
|
Define decimal numeric variable syntax. | |
|
Define boolean variable syntax. | |
|
Define binary numeric variable syntax | |
|
Define a program execution label pointer. | |
|
Define a list of data variables. | |
|
Define National Character variable syntax. | |
|
Define National Character variable initialization. | |
|
Define a record of data variables. | |
|
Alternate method to define a list of data variables. |
Each Data Definition Instruction must conform to the following general format:
There are three system variables (two DIM (S$ERROR$ and S$CMDLIN) and one FORM (S$RETVAL)) that are Common Data Variables within every compiled program.
The following terms are applicable when referencing numeric and character string variables:
Physical Length refers to the size (number of bytes) the variable was declared. If the variable is defined as ten bytes, the Physical Length is ten.
Physical String (Physical Contents) refers to all of the data within the Physical Length of the variable, even those bytes outside the range of the Logical String.
The following terms are only applicable when referencing character string variables since numeric variables do not have a Form Pointer or Logical Length Pointer:
Logical Length refers to the number of bytes from the Form Pointer (FP) to the Length Pointer (LP) inclusive. The Logical Length never exceeds Physical Length.
Logical String (Logical Contents) refers to the data within the Logical Length (Form Pointer to Length Pointer inclusive) and may never be greater than the Physical String.
![]() |