TACL Reference Manual
Built-In Functions and Variables
HP NonStop TACL Reference Manual—429513-018
9-243
#LINEINSV Built-In Function
#LINEINSV Built-In Function
Use #LINEINSV to insert a string into a variable level at a specified line number.
variable-level
is an existing variable level into which string will be inserted. It must not be in a
shared segment and must not be a DIRECTORY, a STRUCT, or a STRUCT item.
line-addr
is an integer or a variable level that contains an integer. line-addr specifies the
line number at which text is to be inserted. The line 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 to be
inserted. string 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
#LINEINSV returns nothing.
Considerations
•
Leading and trailing spaces in string are preserved, as are all end-of-lines.
•
If line-addr is beyond the end of the variable level, string is appended to the end
of the variable level, starting on a new line.
Examples
Assume that var is a variable level containing:
ABCDEFG
HIJKLMNOPQRST
UVWXYZ
and that var2 is a variable level containing:
NEW
TEXT
1. The invocation:
#LINEINSV var 3 var2
#LINEINSV variable-level line-addr string