Add tags

Add tags to the following comment
Tcl にも info locals というずばりなコマンドがありますが Python と違って返されるのは名前のリストのみなので記述量は若干増えます。
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
proc foo {} {
  set x 1
  set y hello

  set locals [info locals]
  set result {}
  foreach k $locals { lappend result $k [set $k] }
  return $result
}

# % foo
# x 1 y hello

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...