GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
lremove(n) Tcl Built-In Commands lremove(n)


lremove - Remove elements from a list by index

lremove list ?index ...?

lremove returns a new list formed by simultaneously removing zero or more elements of list at each of the indices given by an arbirary number of index arguments. The indices may be in any order and may be repeated; the element at index will only be removed once. The index values are interpreted the same as index values for the command string index, supporting simple index arithmetic and indices relative to the end of the list. 0 refers to the first element of the list, and end refers to the last element of the list.

Removing the third element of a list:

% lremove {a b c d e} 2
a b d e

Removing two elements from a list:

% lremove {a b c d e} end-1 1
a c e

Removing the same element indicated in two different ways:

% lremove {a b c d e} 2 end-2
a b d e

list(n), lappend(n), lassign(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lrepeat(n), lreplace(n), lreverse(n), lsearch(n), lset(n), lsort(n)

element, list, remove
8.7 Tcl

Search for    or go to Top of page |  Section n |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.