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=-1.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FROM_STARTS_WITH_NUMS autolearn=no autolearn_force=no version=3.4.4 X-Received: by 10.36.68.196 with SMTP id o187mr14306425ita.41.1519831589887; Wed, 28 Feb 2018 07:26:29 -0800 (PST) X-Received: by 10.157.94.15 with SMTP id d15mr840858oti.4.1519831589528; Wed, 28 Feb 2018 07:26:29 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.am4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!w142no727468ita.0!news-out.google.com!a2ni2135ite.0!nntp.google.com!w142no727467ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 28 Feb 2018 07:26:29 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.240.208.48; posting-account=rhqvKAoAAABpikMmPHJSZh4400BboHwT NNTP-Posting-Host: 85.240.208.48 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: body stub not allowed in inner scope From: Mehdi Saada <00120260a@gmail.com> Injection-Date: Wed, 28 Feb 2018 15:26:29 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 2283 X-Received-Body-CRC: 3451123097 Xref: reader02.eternal-september.org comp.lang.ada:50709 Date: 2018-02-28T07:26:29-08:00 List-Id: I am aware of this. Sad but true. Eventhough those change in semantics might seem logical for a human being, it can become a nightmare to formulate and integrate with the preexisting rules. I refactorized (is it the good term ?) my code, to put as much subprograms in a standalone package, and reduce the nested subprograms in the two cases where I really needed the context. All is fine, EXCEPT I had to introduce an access to STRING where I wanted an inner block. It broke my heart. Which gave me a main program like this: with LEDIT; use LEDIT; procedure MAIN is LINE: access constant String; -- EVIL!! CURSOR: NATURAL; procedure SEPARATE_NUMBER_AND_CONTENT is separate; procedure ANALYSE_LIST_COMMAND is separate; begin while not END_OF_FILE(Standard_Input) loop LINE := new STRING'(TRIM(LET_ONLY_GRAPHIC_CHARACTERS(GET_LINE), LEFT)); ... end loop; ... end MAIN; Whereas I wanted this, because SEPARTE... and ANALYSE... NEED to know about LINE, but can't be declared in a block. while_loop declare LINE : STRING := PROCESSING(GET_LINE); BLABLA is separate; begin BLABLA; end; end loop;