DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

lvarpop(TCL)


lvarpop -- delete list element indexed by specified variable

Syntax

lvarpop var [indexExpr] [string]

Description

The lvarpop command pops (deletes) the element indexed by the expression indexExpr from the list contained in the variable var. If index is omitted, then 0 is assumed. If string is specified, then the deleted element is replaced by string. The replaced or deleted element is returned. Thus lvarpop argv 0 returns the first element of argv, setting argv to contain the remainder of the string.

If the expression indexExpr starts with the string ``end'', then ``end'' is replaced with the index of the last element in the list. If the expression starts with ``len'', then ``len'' is replaced with the length of the list.


© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003