Author: coke Date: Mon Jul 4 20:15:13 2005 New Revision: 8506 Modified: trunk/languages/tcl/lib/commands/expr.imc Log: pass one more tcl-test, [expr]
Modified: trunk/languages/tcl/lib/commands/expr.imc ============================================================================== --- trunk/languages/tcl/lib/commands/expr.imc (original) +++ trunk/languages/tcl/lib/commands/expr.imc Mon Jul 4 20:15:13 2005 @@ -24,7 +24,8 @@ expr = "" looper = 0 - argc = argv + argc = argv + unless argc goto no_args loop: if looper == argc goto loop_done @@ -42,4 +43,9 @@ loop_done: (return_type,retval) = expression_i(retval) done: .return(return_type,retval) + +no_args: + retval = new String + retval = "wrong # args: should be \"expr arg ?arg ...?\"" + .return(TCL_ERROR,retval) .end