Forum Discussion

2 Replies

  • lindex
    and
    getfield
    are different function of tcl and can be used in different situation.

    • lindex: command treats list as a Tcl list and returns the index'th element from it (0 refers to the first element of the list). In extracting the element, lindex observes the same rules concerning braces and quotes and backslashes as the Tcl command interpreter; If index is negative or greater than or equal to the number of elements in value, then an empty string is returned.

    • getfield Splits a string on a character or string, and returns the string corresponding to the specific field. The field_number parameter is 1 indexed.

  • lindex
    and
    getfield
    are different function of tcl and can be used in different situation.

    • lindex: command treats list as a Tcl list and returns the index'th element from it (0 refers to the first element of the list). In extracting the element, lindex observes the same rules concerning braces and quotes and backslashes as the Tcl command interpreter; If index is negative or greater than or equal to the number of elements in value, then an empty string is returned.

    • getfield Splits a string on a character or string, and returns the string corresponding to the specific field. The field_number parameter is 1 indexed.