Author: coke
Date: Fri Sep 16 19:26:36 2005
New Revision: 9204

Modified:
   branches/leo-ctx5/languages/tcl/lib/commands/global.pir
Log:
Fix a bug: don't fail if a global doesn't exist, just skip it. When we
reference the variable later, it'll fail then just fine.
Pass at least one more test in the tcl test suite this way.



Modified: branches/leo-ctx5/languages/tcl/lib/commands/global.pir
==============================================================================
--- branches/leo-ctx5/languages/tcl/lib/commands/global.pir     (original)
+++ branches/leo-ctx5/languages/tcl/lib/commands/global.pir     Fri Sep 16 
19:26:36 2005
@@ -26,24 +26,19 @@ loop:
   varname = argv[ii]
   sigil_varname = "$" . varname
 
-  push_eh no_such_var
+  push_eh next
     $P1 = find_global "Tcl", sigil_varname
   clear_eh
 
   store_lex call_level, sigil_varname, $P1
 
+next:
   inc ii
   goto loop
   
 done:
   .return("")
 
-no_such_var:
-  $S0 = "can't read \""
-  $S0 .= varname
-  $S0 .= "\": no such variable"
-  .throw($S0)
-
 badargs:
   .throw("wrong # args: should be \"global varName ?varName ...?\"")
 

Reply via email to