From help-octave-request at bevo dot che dot wisc dot edu Thu Jan 27 10:14:46 2000 Subject: Re: Suggestion: add do-enddo(condition) From: David Doolin To: "John W. Eaton" cc: Thomas Walter , help-octave@bevo.che.wisc.edu, doolin@cs.utk.edu Date: Thu, 27 Jan 2000 11:14:39 -0500 In message <14479 dot 62596 dot 568389 dot 278559 at tillamook-sharp dot bogus dot domain>, "John W. E aton" writes: >On 19-Oct-1999, Thomas Walter wrote: > >| for some programing logic, I want to suggest to add a >| >| do >| ... >| enddo (CONDITION) >| >| to the octave interpreter. >| >| Pros and cons? > >Do you expect this to execute the loop as long as CONDITION is true, >with a minimum of one trip through? If so, then I think > > do > while (CONDITION) Maybe do until (CONDITION) I would probably find a way to use any form of this, so I don't really care one way or another. If I were going to implement it, I would use the form easiest to parse (which may not be using `while'). FWIW, in a current code I have a couple of do whiles nested in a for loop. So it can be very handy once in a while. Thanks, Dave D ----------------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.che.wisc.edu/octave/octave.html How to fund new projects: http://www.che.wisc.edu/octave/funding.html Subscription information: http://www.che.wisc.edu/octave/archive.html -----------------------------------------------------------------------