Welcome to my Tcl/Tk page.
::bsh::IFS Internal field separators, normally SPACE, TAB, and NEWLINE. ::bsh::set ?argument ...? The arguments are positional parameters and are assigned, in order, to $1, $2, and so on. If no arguments are given, the values of all names are printed. ::bsh::shift ?n? The positional parameters are shifted to the left, from position n+1 to position 1, and so on. Previous values for $1 through $n are discarded. If n is not given, it is assumed to be 1.
# Sample 1 package require bsh ::bsh::set {AA BB CC} puts ${#} =>3 puts "$1 $2 $3" => AA BB CC puts ${*} => AA BB CC ::bsh::shift puts ${#} =>2 puts "$1 $2" => AA BB puts ${*} => AA BB |
# Sample 2 package require bsh set ::bsh::IFS ":" ::bsh::set {AA:BB:CC} puts ${#} =>3 puts "$1 $2 $3" => AA BB CC puts ${*} => AA BB CC ::bsh::shift puts ${#} =>2 puts "$1 $2" => AA BB puts ${*} => AA BB |
# Sample 3 package require bsh proc foo {args} { ::bsh::set $args } ::bsh::set $argv |