comp.lang.ada
 help / color / mirror / Atom feed
From: Steve Jones - JON <jon@hp755d2.eurocontrol.fr>
Subject: Re: loop and block question
Date: 1997/01/29
Date: 1997-01-29T00:00:00+00:00	[thread overview]
Message-ID: <2svi8g5rzr.fsf@hp755d2.eurocontrol.fr> (raw)
In-Reply-To: 1997Jan29.171423.3481@news.nbi.dk


Bravely stepping forward from memory and with a question...
sparre@meyer.fys.ku.dk (Jacob Sparre Andersen) writes:
> 
> procedure Two_Loops is
> 
> begin
> 
> Block_1:
>    begin
> 
>    Some_Loop_Name:
>       for Index in 1 .. 10 loop
>          null;
>       end loop Some_Loop_Name;
>    end Block_1;
> 
> Block_2:
>    begin
> 
>    Some_Loop_Name:
You have reused Some_Loop_Name these labels should be unique just like the
compiler output tells you. Having never used the dreaded GOTO I cannot
be certain but I think that this is what the Labels COULD be used for
(if you wanted to die a slow and painful death).
[snip]

Now a question, why does Ada have GOTOs, why does code need to be changed
to avoid GOTOs problems ? I remember having a bunch of exception handling
blocks within a case statement, I had to create individual names for
each one rather than just using a unified label (eg Exception_Block)
we can overload everything BUT labels.

GOTO has unusual syntax so why not specific GOTO Labels ?

And yes this problem has manifested itself today due to some cutting
and pasting :(

-- 
Un Lupe en France  | Cat 1, Cha, Cha, Cha -- NERC offical drinking song
----The above of opinions rarely reflect my own and never my employers------
Do not add me to mailing lists violations will be billed for time.





  reply	other threads:[~1997-01-29  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-01-29  0:00 loop and block question Jacob Sparre Andersen
1997-01-29  0:00 ` Steve Jones - JON [this message]
1997-01-29  0:00   ` Robert A Duff
     [not found]   ` <E4wHKC.FB5@thomsoft.com>
     [not found]     ` <32F3D3BA.4B88@ssf.fi>
     [not found]       ` <E4yCBo.FrC@world.std.com>
1997-03-16  0:00         ` Niklas Holsti
1997-01-29  0:00 ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox