MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

goto and label (cont)

  • To: mathgroup at
  • Subject: [mg57768] goto and label (cont)
  • From: Guy Israeli <guyi1 at>
  • Date: Wed, 8 Jun 2005 03:21:16 -0400 (EDT)
  • References: <d83rft$s68$>
  • Sender: owner-wri-mathgroup at

Hi again,

since everyone tells me not to use goto and label (although for the use i'll 
describe below it is very comfterable and the simplest way to do it. If 
anyone can suggests an alternative/mathematica way of doing it, please do.

the pseudocode with goto

do something1
if condition1==true goto[l]
do something2
if condition2==true goto[l]
do some other stuff

as you see i do something1 then check some cond. if something didn't go well 
i start doing everything from the start. same for something2. I want to go 
all the way to the top. using a while or something alike would need some 
variable to hold it and maintaine which is messy. or if a do while loop 
exists (?) it will need to do everything and then restart. I want some 
mechanism that will restart itself if conditions are not met. goto seems the 
only simple option to do it.

again, suggestions are always welcomed

Thanks a lot,


  • Prev by Date: Re: automatic slide shift
  • Next by Date: Re: BarChart
  • Previous by thread: Re: Solve with assumptions
  • Next by thread: Re: goto and label (cont)