lindex(n) Tcl Built-In Commands lindex(n) _________________________________________________________________ NAME lindex - Retrieve an element from a list SYNOPSIS lindex _l_i_s_t _i_n_d_e_x _________________________________________________________________ DESCRIPTION This command treats _l_i_s_t as a Tcl list and returns the _i_n_d_e_x'th element from it (0 refers to the first element of the list). In extracting the element, _l_i_n_d_e_x observes the same rules concerning braces and quotes and backslashes as the Tcl command interpreter; however, variable substitution and command substitution do not occur. If _i_n_d_e_x is negative or greater than or equal to the number of elements in _v_a_l_u_e, then an empty string is returned. If _i_n_d_e_x has the value end, it refers to the last element in the list. KEYWORDS element, index, list Tcl Last change: 7.4 1