Data update
This commit is contained in:
parent
4d5544505c
commit
4924dd0264
3073 changed files with 55820 additions and 4408 deletions
10
Task/Array-length/Tcl/array-length-7.tcl
Normal file
10
Task/Array-length/Tcl/array-length-7.tcl
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# The ''lindex'' command returns a single item at a given index of a list
|
||||
|
||||
set c [lindex $fruit 2] ;# "cherries" (0-based index)
|
||||
|
||||
# The ''lrange'' command returns a given range of items from a list, as a new list.
|
||||
|
||||
set A [lrange $fruit 0 2] ;# {apples oranges cherries} (list)
|
||||
|
||||
# An empty list is not necessarily an empty string:
|
||||
set var { } ;# $var => " ", but [llength $var] => 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue