Character String Variables


ANSI

 

Character string variables are defined using the types DIM, INIT, NCHAR and NINIT. DIM instructions define only the Physical Length (unless an initialized array in which case INIT guidelines apply), while INIT instructions define the Physical Length, Physical String, Logical Length, and Logical String. NCHAR and NINIT provide National Character support.

Note the following:

  1. The size of a character string variable is set at definition time. These definitions may only be changed with the SFORMAT instruction.

  2. The maximum length of a character string variable or literal is 32,767 bytes in SUNDB86 while PLBCMP supports lengths up to 32MB.

  3. The Length Pointer (LP) may never exceed Physical Length (PL) of a variable.

  4. The Form Pointer (FP) may never exceed the Length Pointer (LP).

  5. A null variable is indicated by a Form Pointer (FP) of zero (0).

  6. Character string arrays require a DIM definition, however, they may be initialized.

 

 

See Also: Data Definitions

 



PL/B Language Reference Pointers National Character String Variables