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

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

Peter Robinson wrote:
> 
> 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.
> > 
> 
> I don't get it, Matt.

In this post I was simply saying that Chris' proposal for labeling loops
looked better than the current syntax.

> 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?


But, yes, if we're going to have goto, I don't see the usefulness of
the more limited approach you've given here.

Matt

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

Search



Quick Links

User menu

Not signed in.

Misc Menu