new files
This commit is contained in:
parent
3af7344581
commit
86c034bb8b
1364 changed files with 21352 additions and 0 deletions
12
Task/Collections/Tcl/collections-1.tcl
Normal file
12
Task/Collections/Tcl/collections-1.tcl
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
set c [list] ;# create an empty list
|
||||
# fill it
|
||||
lappend c 10 11 13
|
||||
set c [linsert $c 2 "twelve goes here"]
|
||||
# iterate over it
|
||||
foreach elem $c {puts $elem}
|
||||
|
||||
# pass to a proc
|
||||
proc show_size {l} {
|
||||
puts [llength $l]
|
||||
}
|
||||
show_size $c
|
||||
Loading…
Add table
Add a link
Reference in a new issue