TACL Reference Manual

Built-In Functions and Variables
HP NonStop TACL Reference Manual429513-018
9-58
#CHARFINDRV Built-In Function
Each logical line contains an end-of-line character that counts as one byte. For
variables that contain TACL statements, each metacharacter uses the number of
visible characters plus one, including unprintable characters that are subject to
change from one TACL RVU to another. Nonmetacharacters use one byte.
Examples
Assume that var is a variable level containing:
ABCDEFG
HIJKLMNOPQRST
UVWXYZ
and that var2 is a variable level containing:
IJK
1. Either of the invocations:
#CHARFINDRV var 28 "IJK" or #CHARFINDRV var 28 var2
returns 10; the nearest occurrence of IJK ending before character address 28
starts at character address 10.
2. Either of the invocations:
#CHARFINDRV var 11 "IJK" or #CHARFINDRV var 11 var2
returns 0; although an occurrence of IJK starts at character address 10, it does not
end before or at character address 12.
3. The invocation:
#CHARFINDRV var 28 "FOO"
returns 0; there are no occurrences of FOO anywhere in var.