From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_20,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9c3095e7116890a3 X-Google-Attributes: gid103376,public From: Steve Jones - JON Subject: Re: loop and block question Date: 1997/01/29 Message-ID: <2svi8g5rzr.fsf@hp755d2.eurocontrol.fr>#1/1 X-Deja-AN: 213017275 references: <1997Jan29.171423.3481@news.nbi.dk> organization: Eurocontrol Experimental Centre, Bretigny-Sur-Orge, France newsgroups: comp.lang.ada Date: 1997-01-29T00:00:00+00:00 List-Id: 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.