From help-octave-request at octave dot org Fri Apr 16 06:54:30 2004 Subject: Goto or equivalent? From: Vic Norton To: help at octave dot org Date: Fri, 16 Apr 2004 07:52:59 -0400 Is there any goto or equivalent in octave? I can't seem to find one. At the simplest level I would like to write something like ... code ... if (you_are_done) goto END_MAIN; endif ... more code if not done ... END_MAIN:; This mechanism can easily accomplished in a subroutine. Just replace "goto END_MAIN" with "return" and forget the last line. But can it be done in the main program without a big if-block? Regards, Vic ------------------------------------------------------------- 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 -------------------------------------------------------------