comp.lang.ada
 help / color / mirror / Atom feed
From: Marek Kuziel <ficorax@gmail.com>
Subject: Re: Is this a gnat problem?
Date: Tue, 19 Feb 2019 19:33:44 +0100
Date: 2019-02-19T19:33:44+01:00	[thread overview]
Message-ID: <q4hi68$mo2$1@dont-email.me> (raw)
In-Reply-To: <q4hhgc$6g8$1@gioia.aioe.org>

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

  reply	other threads:[~2019-02-19 18:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19 18:22 Is this a gnat problem? lyttlec
2019-02-19 18:33 ` Marek Kuziel [this message]
2019-02-19 18:35 ` Egil H H
2019-02-19 20:31   ` Jeffrey R. Carter
2019-02-19 22:47     ` lyttlec
replies disabled

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