TACL Reference Manual

Built-In Functions and Variables
HP NonStop TACL Reference Manual429513-018
9-65
#CHARINS Built-In Function
#CHARINS Built-In Function
Use #CHARINS to insert text into a variable level at a specified character address.
string
is a string constant or the name of an existing variable level into which text is to 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 text is to be
inserted. The character address must be in the range from 1 to max-int,
inclusive.
text
is the text to be inserted. The largest valid text length is 32,000 words minus the
current contents of the stack. The stack is typically 25,000 words long.
Result
#CHARINS returns nothing.
Considerations
A text specification can include internal end-of-lines if the entire invocation is
enclosed in square brackets, but leading and trailing spaces and end-of-lines are
ignored.
If char-addr is beyond the end of the variable level, the text 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.
Examples
Assume that var is a variable level containing:
ABCDEFG
HIJKLMNOPQRST
UVWXYZ
#CHARINS string char-addr text