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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Marek Kuziel Newsgroups: comp.lang.ada Subject: Re: Is this a gnat problem? Date: Tue, 19 Feb 2019 19:33:44 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 19 Feb 2019 18:33:45 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="bcf8627914ced205b652c39abdd7433d"; logging-data="23298"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+MNpoN8Q7InPQYAS4t/D6v" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 Cancel-Lock: sha1:wPRkatm9KRaJ5ff2HKobgRzu6Eo= In-Reply-To: Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:55585 Date: 2019-02-19T19:33:44+01:00 List-Id: W dniu 19.02.2019 o 19:22, lyttlec pisze: > I'm working through the case study in "Analsable Real-Time Systems > Programming in Ada" by Burns & Wellings. So I'm not sure if this is my > not understanding something or gnat. > The following is extracted from the Cyclics package on page 471: > > --- > package Cyclics is > > --- > > task type Cyclic (S : Any_Cyclic_State) is > with Priority => S.Pri; > end Cyclic; > end Cyclics; > > When compiled with gnat it fails with the following errors: > > cyclics.ads:17:06: missing "end Cyclic;" > cyclics.ads:18:08: misspelling of "Cyclics" > > The code compiles fine if changed to : > > --- > package Cyclics is > > --- > > task type Cyclic (S : Any_Cyclic_State) is > pragma Priority (S.pri); > end Cyclic; > end Cyclics; > > The book code seems correct and I'm not sure if the modified code has > the effect intended in the text. > Can anyone help? > Maybe something like that: package Cyclics is --- task type Cyclic (S : Any_Cyclic_State) with Priority => S.Pri is end Cyclic; end Cyclics; Marek