TACL Reference Manual
Built-In Functions and Variables
HP NonStop TACL Reference Manual—429513-018
9-47
#CHARBREAK Built-In Function
#CHARBREAK Built-In Function
Use #CHARBREAK to insert an end-of-line into a variable level at a specified character
position.
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.
char-addr
is the character position at which the end-of-line is to be inserted.
Result
#CHARBREAK returns nothing.
Considerations
•
Each line break contains an internal end-of-line character that counts as one byte.
•
#CHARBREAK inserts the end-of-line immediately preceding the existing character
at char-addr.
•
The end-of-line is inserted regardless of whether there is already an end-of-line at
char-addr.
•
If char-addr is 1, an end-of-line is inserted at the beginning of the variable level.
•
If char-addr is beyond the end of the variable level, no end-of-line is inserted.
•
IF char-addr is less than 1, an error occurs.
Example
Assume that var is a variable level containing:
ABCDEFG
HIJKLMNOPQRST
UVWXYZ
The invocation:
#CHARBREAK var 13
causes var to contain:
ABCDEFG
HIJK
#CHARBREAK variable-level char-addr