call scan(str,n,pos,len[,delims]);
Returns the position and length of the n-th word in a string. If
n < 0, call scan counts words right to left. If n = 0 or |n|> the
number of words in str, call scan returns zero in pos and len.
delims specifies character(s) that separate words. The default
ASCII delimiters are: space . < ( + & ! $ * ) ; ^ - / , % | . The
default EBCDIC delimiters are: space . < ( + | & ! $ * ) ; ¬ - / , %
| ¢. Contiguous delimiters are treated as one. Leading and
trailing delimiters are ignored. To extract the desired word
after calling call scan, use substrn (p. 152).
Examples:
call scan('1 ab xyz',2,pos,len) → pos=3, len=2.
call scan('1 ab xyz',-3,pos,len) → pos=1, len=1.
call scan('1 ab xyz',5,pos,len) → pos=0, len=0.
call scan('1,ab xyz',2,pos,len,',') → pos=3, len=6.
call scan('1,ab xyz',2,pos,len,' ,') → pos=3, len=2.
call scan('123.abc(xyz)',3,pos,len) → pos=9, len=3.