TACL Reference Manual

Built-In Functions and Variables
HP NonStop TACL Reference Manual429513-018
9-224
#LINEBREAK Built-In Function
#LINEBREAK Built-In Function
Use #LINEBREAK to insert an end-of-line into a variable level at a specified point in a
specified line.
variable-level
is the name of an existing variable level into which the end-of-line is to 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 into which the end-of-line is to be inserted. The line address must be
in the range from 1 to max-int, inclusive.
char-offset
is an integer or a variable level that contains an integer. char-offset is the
position of the character within the specified line at which the end-of-line is to be
inserted.
Result
#LINEBREAK returns nothing.
Considerations
Each logical line contains an internal end-of-line character that counts as one
byte.When you use the #LINEBREAK built-in function, TACL inserts the end-of-line
character immediately before the specified character.
If char-offset is greater than the number of characters in the line, the new end-
of- line is inserted immediately before the existing end-of-line.
If line-addr andchar-offset are both 1, an end-of-line is inserted at the
beginning of the variable level. If line-addr is beyond the end of the variable
level, no end-of-line is inserted.
Example
Assume that var is a variable level containing:
ABCDEFG
HIJKLMNOPQRST
UVWXYZ
#LINEBREAK variable-level line-addr char-offset