From bug-octave-request at bevo dot che dot wisc dot edu Thu Nov 21 12:53:04 2002 Subject: 'clear' command and % comments at end of line -- behavior changes from 2.1.36 to 2.1.39 From: Peter Van Wieren To: bug-octave at bevo dot che dot wisc dot edu Date: Thu, 21 Nov 2002 12:27:45 -0600 Hello, In debugging a octave '.m' script, I have found that when using 'clear' octave no longer ignores comments at the end of a line denoted by the '%' character. Was this intended ?. As of version 2.1.36 octave ignores the comment, in 2.1.39 it does not - thus the 'delete variables' comment unexpectedly deletes all variables in memory. For example, below I have run the following four lines in 2.1.36 , and 2.1.39 x = y = z = 1 ; whos -v clear x y % delete variables whos -v Thanks, Peter maui 0 2% octave GNU Octave, version 2.1.36 (i686-pc-linux-gnu). Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 John W. Eaton. This is free software; see the source code for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'. Report bugs to . octave:1> x = y = z = 1 ; octave:2> whos -v *** local user variables: prot type rows cols name ==== ==== ==== ==== ==== rwd scalar 1 1 x rwd scalar 1 1 y rwd scalar 1 1 z octave:3> clear x y % delete variables octave:4> whos -v *** local user variables: prot type rows cols name ==== ==== ==== ==== ==== rwd scalar 1 1 z octave:5> exit maui 0 3% molokai 0 1% octave GNU Octave, version 2.1.39 (i686-pc-linux-gnu). Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 John W. Eaton. This is free software; see the source code for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'. Please contribute if you find this software useful. For more information, visit http://www.octave.org/help-wanted.html Report bugs to . octave:1> x = y = z = 1 ; octave:2> whos -v *** local user variables: prot type rows cols name ==== ==== ==== ==== ==== rwd scalar 1 1 x rwd scalar 1 1 y rwd scalar 1 1 z octave:3> clear x y % delete variables octave:4> whos -v octave:5> exit molokai 0 2% The OS is redhat linux 7.2 -- Peter Van Wieren, Project Engineer, AVL Powertrain Engineering, Inc. 734 414 9678 (voice) 734 414 9690 (fax) email: peter dot vanwieren at avlna dot com ------------------------------------------------------------- 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 -------------------------------------------------------------