TACL Reference Manual

Built-In Functions and Variables
HP NonStop TACL Reference Manual429513-018
9-67
#CHARINSV Built-In Function
#CHARINSV Built-In Function
Use #CHARINSV to insert a string into a variable level at a specified character
address.
variable-level
is a string constant or the name of an existing variable level into which a string will
be inserted. It must not be in a shared segment or be a DIRECTORY, a STRUCT,
or a STRUCT item.
char-addr
is an integer greater than zero or a variable level that contains an integer greater
than zero. char-addr specifies the character position at which the string is to be
inserted. The character address must be in the range from 1 to max-int,
inclusive.
string
is the string constant or the name of a variable level that contains text. string
specifies the string to be inserted. 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
#CHARINSV returns nothing.
Considerations
The trailing end-of-line in string is suppressed. Leading and trailing spaces are
preserved, as are all other end-of-lines.
If char-addr is beyond the end of the variable level, the string is concatenated
with the last line in the variable level.
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.
#CHARINSV variable-level char-addr string