HP 3000 Manuals

LENGTH [ HP COBOL II/XL Quick Reference Guide ] MPE/iX 5.0 Documentation


HP COBOL II/XL Quick Reference Guide

LENGTH 

The LENGTH function returns an integer equal to the length of the
argument in character positions (bytes).  To conform to ANSI
standard COBOL, you can use the LENGTH function instead of the .LEN.
pseudo-intrinsic.  The function type is integer.

Syntax 

     FUNCTION LENGTH (parameter-1)

Parameters 

parameter-1           A nonnumeric literal or a data item of any class or
                      category.

                      If parameter-1 or any data item subordinate to
                      parameter-1 is described with the DEPENDING phrase
                      of the OCCURS clause, the contents of the data item
                      referenced by the data-name specified in the
                      DEPENDING phrase are used at the time the LENGTH
                      function is evaluated.



MPE/iX 5.0 Documentation