From: Daniel Norber <danielnorberto@gmail.com>
Subject: Re: How to do multiple instances of a generic packages in automated way. (using ravenscar profile)
Date: Mon, 11 Apr 2016 02:14:14 -0700 (PDT)
Date: 2016-04-11T02:14:14-07:00 [thread overview]
Message-ID: <2db8b996-1c47-4789-97a8-075588598368@googlegroups.com> (raw)
In-Reply-To: <ne5k2d$omh$1@dont-email.me>
>
> It might assist us in isolating issues if you let the
> compiler check the reduced source text above, or we might
> incorrectly assume things, including that you might first
> want to seize the opportunity and get a firm grip of Ada. :-)
>
> That being said, with profile Ravenscar active, is there
> a reason why you can't start from a protected type with
> a Size discriminant instead of a generic parameter? Is
> it to do with some version of RavenSPARK in the end?
>
> protected type Buffer (Size : Size_In_Characters) is
> procedure Put (Msg : String);
> entry Get (Msg : out String);
> private
> content : String (1 .. Size);
> end Buffer;
>
> Also note that every String parameter is still allowed to have
> an unspecified number of characters, whereas content has
> a maximum number of them, and also that Get has no way to inform
> its caller about the part of Msg actually filled.
I was trying your approach, but maybe there is something im missing because the GNAT ADA compiler says:
"discriminant part not allowed in protected body"
next prev parent reply other threads:[~2016-04-11 9:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-05 17:09 How to do multiple instances of a generic packages in automated way. (using ravenscar profile) danielnorberto
2016-04-05 17:39 ` Jeffrey R. Carter
2016-04-05 19:39 ` Simon Wright
2016-04-07 12:05 ` danielnorberto
2016-04-07 12:36 ` G.B.
2016-04-11 9:14 ` Daniel Norber [this message]
2016-04-11 13:04 ` Shark8
2016-04-11 17:25 ` Daniel Norber
2016-04-11 15:58 ` Anh Vo
2016-04-11 17:21 ` Daniel Norber
2016-04-11 17:26 ` Anh Vo
2016-04-11 16:59 ` Jeffrey R. Carter
2016-04-11 17:23 ` Daniel Norber
2016-04-11 17:27 ` Jeffrey R. Carter
2016-04-12 5:19 ` Brad Moore
2016-04-26 15:08 ` Daniel Norber
2016-05-05 21:01 ` rieachus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox