TACL Reference Manual

Built-In Functions and Variables
HP NonStop TACL Reference Manual429513-018
9-59
#CHARFINDV Built-In Function
#CHARFINDV Built-In Function
Use #CHARFINDV to find a string constant in a variable level, searching forward from
a specified character address.
EXACT
specifies that the search is to be case-sensitive; if you omit it, the search makes no
distinction between uppercase and lowercase letters.
string-1
is a string constant or an existing variable level in which TACL will search for
string-2. It must not be in a shared segment or be a DIRECTORY, a STRUCT,
or a STRUCT item. The largest valid string length is 32,000 words minus the
current contents of the stack. The amount of remaining space is typically 25,000
words long.
char-addr
is an integer greater than zero or a variable level that contains an integer greater
than zero. char-addr specifies the character address at which the search is to
begin. The character address must be in the range from 1 to max-int, inclusive.
string-2
is the string constant or the name of a variable level that contains text. string-2
specifies the characters to be found. It must not be in a shared segment or be a
DIRECTORY, a STRUCT, or a STRUCT item. The largest valid string length is
32,000 words minus the current contents of the stack. The amount of remaining
space is typically 25,000 words long.
Result
#CHARFINDV returns the character address at which string-2 begins. If string-2
is not found, #CHARFINDV returns zero.
Considerations
If char-addr is past the end of the variable level, #CHARFINDV returns zero.
The search begins immediately at the character address specified. If you make
repeated calls to this function, using the result of each as a starting point for the
next, you must add one to that result before supplying it to a subsequent call.
If string-1 is empty, #CHARFINDV returns zero.
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
#CHARFINDV [ / EXACT / ] string-1 char-addr string-2