From bug-octave-request at bevo dot che dot wisc dot edu Tue Dec 3 11:55:05 2002 Subject: Re: return, continue, break -> ans = 1 From: "John W. Eaton" To: etienne at isr dot ist dot utl dot pt Cc: "John W. Eaton" , Miroslaw Kwasniak , bug-octave@bevo.che.wisc.edu, Etienne Grossmann , Pascal.Dupuis@esat.kuleuven.ac.be, octave-maintainers mailing list Date: Tue, 3 Dec 2002 11:54:52 -0600 On 3-Dec-2002, Etienne Grossmann wrote: | I only sent the report because I was unaware of the change and | thought it may be the result of some underlying problem. I only | noticed that when some of my functions started printing '1' (the value | of break) wherever I use it w/out a ';' after it. Otherwise, the | perlier, the better. Biased, me? I would be happy to have the Perl-like behavior, but not with all the other bad side effects that happened with my simple-minded patch. To make it work correctly, I think we would have to have a completely different way of interpreting expressions that involved break, continue, and return. Doing that is likely to complicate the parser and interpreter a lot, and I don't think it is really worth it. If you (or someone else) can provide a nice clean set of patches that do the right thing, I'd take a look at them. 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 -------------------------------------------------------------