Re: WISHLIST.TXT

new topic     » goto parent     » topic index » view thread      » older message » newer message

Knowing what to do with goto's, I agree with your position.
    But, over time, letting people to use goto led to programs controlled by
goto's rather than controlled goto's.
    So I'm not optimistic about uncontrolled goto creeping into Euphoria,
while there is a case to be made in favor of controlled forms (call it
resume or whatecver, named exit,...)

Chris

----- Original Message -----
From: "Kat" <gertie at PELL.NET>
To: "EUforum" <EUforum at topica.com>
Sent: Friday, August 23, 2002 6:46 PM
Subject: Re: WISHLIST.TXT


>
> On 23 Aug 2002, at 17:54, christian.cuvier at education.gouv.fr wrote:
>
> >
> > ----- Original Message -----
> > From: "Derek Parnell" <ddparnell at bigpond.com>
> > To: "EUforum" <EUforum at topica.com>
> > Sent: Friday, August 23, 2002 4:51 PM
> > Subject: Re: WISHLIST.TXT
> >
> >
> > > Not really. By "end loop" I assume you are telling the interpreter to
> > finish
> > > looping through the current loop block. If so, what is the difference
> > > between "end loop" and the current "exit" statement?
> > >
> >
> > Not really. I'd like to tell the interpreter to finish the current
iteration in
> > this loop block and immediately start next iteration. So, current *exit*
> > transfers control after end of block, and *end loop* would transfer
control to
> > top loop statement. Thus they differ.
>
> Yet another arguement FOR goto! It's one word, and it does what it says:
>
>
> :restartloop:
> -- initvars
> for loop = 1 to something do
>  --code
>   if whatever1 then goto restartloop end if
>   if whatever2 then goto endloop end if
>   if whatever3 then goto resumeloop end if
> --code
> :resumeloop:
> -- possible code
> end for
> :endloop:
>
> Kat
>
>
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu