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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: body stub not allowed in inner scope Date: Thu, 1 Mar 2018 10:38:52 +0200 Organization: Tidorum Ltd Message-ID: References: <55cd79f5-4b37-4b08-b292-073ed2f37021@googlegroups.com> <15c49c4e-726a-4fd7-bf35-c7d27ff9a491@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net qyjeNO2n4/RDtXcgq/RvoAy+Vzk6Cy1LckZZdnUj0YB6U5pT6t Cancel-Lock: sha1:JtbSAGe076dJdVyrOGBuyZaOctw= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: Xref: reader02.eternal-september.org comp.lang.ada:50739 Date: 2018-03-01T10:38:52+02:00 List-Id: On 18-03-01 01:23 , Randy Brukardt wrote: > "Mehdi Saada" <00120260a@gmail.com> wrote in message > news:15c49c4e-726a-4fd7-bf35-c7d27ff9a491@googlegroups.com... >> Thanks. >> But that's ugly... How about fixing this for the next norm ? > > Does anyone other than ACATS tests actually use stubs these days? Why? I occasionally use a stub when a subprogram has to be implemented differently for different compilation targets (say, embedded-SPARC vs PC-x86). Generally I prefer to have different bodies of entire packages for different targets, but occasionally the difference is so small and local (or is a late addition) that separating just a subprogram is convenient. Stubs are also used by unit-testing tools, which often add a stub procedure to a package under test, in order to access the declarations in the package body. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .