DOC HOME
SITE MAP
MAN PAGES
GNU INFO
SEARCH
PRINT BOOK
lreplace(TCL)
lreplace -- replace elements in a list with new elements
Synopsis
lreplace
list first last
[
element element ...
]
Description
lreplace
returns a new list formed by replacing one or more elements of
list
with the
element
arguments.
first
gives the index in
list
of the first element to be replaced (0 refers to the first element). If
first
is less than zero then it refers to the first element of
list
; the element indicated by
first
must exist in the list.
last
gives the index in
list
of the last element to be replaced; it must be greater than or equal to
first
.
first
or
last
may be
end
(or any abbreviation of it) to refer to the last element of the list. The
element
arguments specify zero or more new arguments to be added to the list in place of those that were deleted. Each
element
argument will become a separate element of the list. If no
element
arguments are specified, then the elements between
first
and
last
are simply deleted.
02 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 02 June 2005