Re: Replacing GOTO. [was Re: Conceptual problem solved by GOTO]

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

Matt Lewis wrote:
> 
> Chris Bensler wrote:
> > 
> 
> <note the very large snip...please>
> 
> > }}}
<eucode>
> > for "foo" count = get_start_index(addrList[handle]) to
> > stop_index(addrList[handle])
> > by get_element_size(addrList[handle]) do -- counts the number of elements
> in the range of start to stop
> >   if count = x then exit "foo" end if
> > end for
> > </eucode>
{{{

> 
> I think this definitely has some serious merit.
> 
> Matt

I don't get it, Matt.

Are you saying that you favour general jumps like this:

   <code1>
label foo
   <code2>
label bar
   <code3>

where the jump could come from any of the code segments and go to any label
within scope?

But disapprove something like this:

start block
   <code1>
end block

where:-

1. the jump-off point must fall between the defined start and end;
2. the jump must go to an enclosing label, rather than any label in the file;
3. the construct mirrors existing blocks, except that existing blocks have
boundary conditions attached;
4. the existing proposal for goto allows the second construct to be done in
almost exactly that form (adapting the precise syntax of course), but without the
assurances referred to in 1 and 2?

Cheers
Peter Robinson

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

Search



Quick Links

User menu

Not signed in.

Misc Menu