L Code - Length

The L code by itself returns the length of an element. With maximum, or both maximum and minimum parameters, the code returns the element if its length is within the specified range.

Input Conversion

Input conversion does not invert. It simply applies the length processing to the input data.

Syntax

L{{min,}max}

Syntax Elements

max specifies that the process is to return an element if its length is less than or equal to the number max.

min specifies that the process is to return an element if its length is greater than or equal to the number min.

Example

Say that dictionary WORDS has the following data definition items:

     LENGTH          WORD1TO7         WORD8TO11
001  A          001  A           001  A
002  0          002  0           002  0
003  Length     003  Up to 7     003  8 to 11
.               .                .
008  L          008  L7          008  L8,11
009  L          009  L           009  L
010  10         010  10          010  11

In the data section WORDS there are items with item-ids that are ordinary words: a, abnormal, an, argue, configuration, deny, process, suggestion, supposition, workspace.

The following command produces the report below:

:SORT WORDS LENGTH WORD1TO7 WORD8TO11

PAGE 1
WORDS...........  Length....  Up to 7...  8 to 11....

a                  l          a
abnormal           8                      abnormal
an                 2          an
argue              5          argue
configuration     13
deny               4          deny
process            7          process
suggestion        10                      suggestion
supposition       11                      supposition
workspace          9                      workspace

10 ITEMS LISTED.

Go to top button