From bug-octave-request at bevo dot che dot wisc dot edu Fri Dec 12 00:03:03 1997 Subject: Unidentified subject! From: "John W. Eaton" To: hohn at math dot utah dot edu Cc: bug-octave at bevo dot che dot wisc dot edu Date: Fri, 12 Dec 1997 00:04:51 -0600 On 11-Dec-1997, RHS Linux User wrote: | Subject: clear() ignores -x flag | | Bug report for Octave 2.0.5 configured for i486-pc-linux-gnu | | Description: | ----------- | The -x flag to clear() is ignored. | | Repeat-By: | --------- | | octave:1> a =rand(3,3); | octave:2> l = a; | octave:3> whos() | | *** local user variables: | | prot type rows cols name | ==== ==== ==== ==== ==== | wd matrix 3 3 a | wd matrix 3 3 l | | octave:4> clear -x a | octave:5> whos() | octave:6> D'oh. I'm surprised no one has reported this problem yet. Anyway, here is a patch. Also, 2.0.5 is ancient. You should probably upgrade (but if you wait a week or so, 2.0.10 will probably be released). Thanks, jwe Thu Dec 11 23:30:03 1997 John W. Eaton * variables.cc (Fclear): Increment index to skip -x arg. *** octave-2.0.9.94/src/variables.cc Fri Nov 21 13:07:42 1997 --- src/variables.cc Thu Dec 11 23:29:34 1997 *************** *** 1779,1785 **** if (argc > 1) { if (argv[idx] == "-x") ! exclusive = 1; } int lcount = 0; --- 1779,1788 ---- if (argc > 1) { if (argv[idx] == "-x") ! { ! idx++; ! exclusive = 1; ! } } int lcount = 0;