> Date: Fri, 19 Oct 2001 19:06:41 -0700
> From: Van Snyder <[log in to unmask]>
> How does one efficiently read a string and determine its length -- not
> its trimmed length, not its declared length, and not its padded length?
> The SIZE= specifier can only be specified for nonadvancing input. Must
> one use nonadvancing input? It it necessary to count the characters up
> to the EOR, and be careful to specify PAD='no'?
One can also use the SIZE specifier (as you say, with non-advancing input
and with pad = 'no'), which is useful if you want to read in an
entire line of text into a scalar variable. The other way (reading a character at a
time and counting the reads) will be a bit slower, but may be useful for
certain purposes.
> Best regards,
> Van Snyder
|