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.

 

Common Data Items

Define data items passed between programs.

Global Data Items

Define data items passed between programs.

Arrays

Define character or numeric variable arrays.

Pointers

Define variable or object pointers.

Character String Variables

Define character variables.

National Character String Variables

Define national character variables.

DIM

Define character variable syntax.

INIT

Define character variable initialization.

Numeric Variables

Define numeric variables.

FORM

Define decimal numeric variable syntax.

BOOLEAN

Define boolean variable syntax.

INTEGER

Define binary numeric variable syntax

LABEL

Define a program execution label pointer.

LIST and LISTEND

Define a list of data variables.

NCHAR

Define National Character variable syntax.

NINIT

Define National Character variable initialization.

RECORD and RECORDEND

Define a record of data variables.

VARLIST

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:

 

The following terms are only applicable when referencing character string variables since numeric variables do not have a Form Pointer or Logical Length Pointer:

 

 



PL/B Language Reference Common Data Items