help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Goto or equivalent?


From: Vic Norton
Subject: Goto or equivalent?
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
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]