HP 3000 Manuals

LENGTH Command [ HP ALLBASE/4GL Developer Reference Manual Vol. 2 ] MPE/iX 5.0 Documentation


HP ALLBASE/4GL Developer Reference Manual Vol. 2

LENGTH Command 

The LENGTH command calculates the number of characters in a field.

Format 

LENGTH data_ref result_data_ref 

Parameters 

data_ref 

The field whose length is to be calculated.  It can be one of the
following:

   *   A master title name.

   *   A variable or calculated item.

   *   A screen field reference.

   *   A named scratch-pad field reference.

   *   A file record field reference.

   *   A work area field reference.

result_data_ref 

The field into which the length of data_ref is placed.  It can be one of
the following:

   *   A variable.

   *   A screen field name.

   *   A named scratch-pad field name.

   *   A file record field reference.

   *   A work area field reference.

Description 

The LENGTH command calculates the length in characters of the contents of
data_ref.  This length is placed in result_data_ref.

The LENGTH command ignores leading zeros on numeric fields and trailing
spaces on non-numeric fields.

Example 

     LENGTH * V-length

This command determines the number of characters in the current screen
field and places the result into the variable length.



MPE/iX 5.0 Documentation