Re: Exit(n) vs. goto

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

Of course not! As a matter of fact, only now I realize that you 
answered me personally. Be my guest, Derek.

Cheers,

-- Euler

On 18 Feb 2002, at 15:21, Derek Parnell wrote:

> Euler,
> I hope you don't mind me publishing your question in the Eu forum.
> 
> 18/02/2002 2:15:28 PM, "Euler German" wrote:
> 
> >would be possible to have as much identified loops as 
> >we need? I mean, to handle situations when we could use a total, a mid
> >term and a simple (not identified) exit.
> 
> Why not? I would not like to break any existing code so loop labels
> would have to be optional. Also, any loop could have a label. I suspect
> that the loop identifier should only be scoped to the containing routine
> (or file if its not in a routine). Though it might be argued that the
> scope should only be to the identifier loop and nested loops, similar to
> the automatic index variable in FOR loops.
> 
>   for i = 1 to width do:bAcross
>      . . .
>      for j = 1 to Height do:bDown
>         . . .
>         if a then exit bAcross end if
>         . . .
>         while c do:bAnalysis
>             . . . 
>             if b then exit bDown end if
>             if d then exit bAcross end if
>             . . .
>         end bAnalysis
>         . . .
>      end bDown
>      . . . 
>   end bAcross
> 
> --------
> Derek
> 
>

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

Search



Quick Links

User menu

Not signed in.

Misc Menu