From bug-octave-request at bevo dot che dot wisc dot edu Fri Apr 20 07:30:51 2001 Subject: Re: eval() tramples on __error_text__ From: "John W. Eaton" To: Christoph Spiel Cc: bug-octave at bevo dot che dot wisc dot edu Date: Fri, 20 Apr 2001 07:30:42 -0500 On 20-Apr-2001, Christoph Spiel wrote: | Applied your patch. | | Now, '__error_text__' is defined in the catch-string of an eval(), but | it does not get undefined outside of it. In fact, '__error_text__' | cannot be redefined at all. See line :2>, where the error message | should report 'b' to be undefined. | | | octave:1> eval("clear a; a;", "et = __error_text__;"); et, __error_text__ | et = `a' undefined near line 0 column 10 | | __error_text__ = `a' undefined near line 0 column 10 | | octave:2> try clear b; b; catch et = __error_text__; end_try_catch; et | et = `a' undefined near line 0 column 10 | | | For reasons beyond my imagination, the symbol '__error_text__' winds | up in in 'curr_sym_tab', but bind_builtin_constant() accesses | 'global_sym_tab'. Hmm. This is not the behavior I see with the current CVS sources (same as 2.1.34 at this point): octave:1> eval("clear a; a;", "et = __error_text__;"); et, __error_text__ et = `a' undefined near line 0 column 10 __error_text__ = octave:2> try clear b; b; catch et = __error_text__; end_try_catch; et et = `b' undefined near line 2 column 14 octave:3> __error_text__ __error_text__ = octave:4> who *** local user variables: et *** globally visible user variables: __disable_lyap_interface_change_warning__ jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------