*ZF (KEYIN and DISPLAY)


ANSI

*ZF

 

When this list control is used in a KEYIN instruction, it zero-fills a character string variable with zeros. If the entry is null, the control is ignored. It has no effect on numeric variables. This control only affects the next variable in the list. This control will also zero fill all the elements of a data variable when the variable following the *ZF is an ARRAY (without index), RECORD, or a VARLIST. The following examples demonstrate this control:

 

RECVING

DIM

12

 

KEYIN

*ZF,RECVING

 

Data

PL

FP

LP

Contents

12345[E]

12

1

12

123450000000

 

 

KEYIN

*JR,*ZF,RECVING

 

Data

PL

FP

LP

Contents

12345[E]

12

1

12

000000012345

 

When this control is used in a DISPLAY instruction, it zero-fills any FORM variables and replace any leading spaces in DIM variables with zeros. The following examples demonstrate this control:

 

RECV1

DIM

12

RECV2

FORM

12

 

Variable

PL

FP

LP

Contents

RECV1

12

1

5

12345•••••••

RECV2

12

 

 

•••••••12345

 

 

DISPLAY

*ZF,RECV1

Displays'12345•••••••'

 

 

DISPLAY

*ZF,RECV2

Displays'000000012345'

 

 

See Also: List Controls (KEYIN and DISPLAY), List Controls (KEYIN), DISPLAY, KEYIN

 



PL/B Language Reference *W (KEYIN and DISPLAY) *ZFOFF (KEYIN and DISPLAY)