NET/MASTER Network Control Language (NCL) Reference Manual
OVERLAY
Built-in Functions
4–64 106126 Tandem Computers Incorporated
OVERLAY The OVERLAY built-in function overlays one string with another, beginning at the
character position specified.
OVERLAY(
new
,
target
[,[
start
] [, [
len
] [, [
pad
]
[, [
opt
] [,
pad2
] ] ] ] ] )
new
specifies the data that overlays
target
.
target
specifies the string that is overlayed.
start
specifies the overlay starting character position in
target
.
start
must be a
whole number greater than 0 (zero). If it is not specified, the overlay starts at
character position 1. If
start
specifies a character position beyond the end of
target
,
target
is padded to the character position of
start
using the character
specified in
pad
.
len
specifies the length of the overlay.
len
must be a positive whole number. If
len
is an integer greater than
new
,
new
is padded to the length of
len
; if it is shorter,
the number of characters in
new
is used.
pad
specifies the pad character that pads
new
and
target
. The default is a space.
opt
specifies an option that alters the standard padding rules when
len
is an integer
greater than the length of
new
. The following values may be specified:
L
specifies that
new
is aligned to the left and padded on the right using the
character specified as
pad2
. If
pad2
is not specified, then
pad
is used. This
is the default if
opt
is null or omitted.
R
specifies that
new
is aligned to the right and padded on the left using the
character specified as
pad2
. If
pad2
is not specified, then
pad
is used.