Posted to tcl by kbk at Sun May 09 22:31:15 GMT 2010view raw

  1. % proc tcl::mathfunc::lookup {x} {dict get {1 0 2 1 3 2} $x}
  2. % catch {expr lookup(0)} result options
  3. 1
  4. % set options
  5. -code 1 -level 0 -errorstack {INNER dictGet CALL {tcl::mathfunc::lookup 0}} -errorcode NONE -errorinfo {key "0" not known in dictionary
  6. while executing
  7. "dict get {1 0 2 1 3 2} $x"
  8. (procedure "tcl::mathfunc::lookup" line 1)
  9. invoked from within
  10. "expr lookup(0)"} -errorline 1