## Tcl9.0.3/Tk9.0.3 Documentation > Tcl Commands > lremove

### Tcl/Tk Applications | Tcl Commands | Tk Commands | [incr Tcl] Package Commands | SQLite3 Package Commands | TDBC Package Commands | tdbc::mysql Package Commands | tdbc::odbc Package Commands | tdbc::postgres Package Commands | tdbc::sqlite3 Package Commands | Thread Package Commands | Tcl C API | Tk C API | [incr Tcl] Package C API | TDBC Package C API

### NAME

lremove — リストからindex によって要素を除去 Remove elements from a list by index

### 構文 SYNOPSIS

lremove list ?index ...?

### 説明 DESCRIPTION

lremove は､それぞれ任意の数の index 引数により与えらえた位置の零乃至幾つかのリスト list の要素を順番に削除して形成された新しいリストを返す｡その参照位置は何かの順番か繰返しである;参照位置の要素は一度だけ除去される｡参照の値は単純な算術参照とリストの末尾への相対参照を運営している string index 命令と同じに解釈される｡ 0 はリストの最小の要素を参照し､ end はリストの末尾の要素を参照する｡ lremove returns a new list formed by simultaneously removing zero or more elements of list at each of the indices given by an arbitrary 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.

### 実施例 EXAMPLES

リストの三番目の要素を取除く: 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

### SEE ALSO

list, lappend, lassign, ledit, lindex, linsert, llength, lmap, lpop, lrange, lrepeat, lreplace, lreverse, lsearch, lseq, lset, lsort

### KEYWORDS

element, list, remove
Copyright © 2019 Donal K. Fellows.