The syntax for selecting list item at a specific index is
lindex listname index
Example:
set var {orange blue red green} puts [lindex $var 0] puts [lindex $var 1] puts [lindex $var 2] puts [lindex $var 3]
Jan 4, 2022 | tcl | 0 comments
The syntax for selecting list item at a specific index is
lindex listname index
Example:
set var {orange blue red green} puts [lindex $var 0] puts [lindex $var 1] puts [lindex $var 2] puts [lindex $var 3]
Subscribe now to keep reading and get access to the full archive.
Recent Comments