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!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: How to do multiple instances of a generic packages in automated way. (using ravenscar profile) Date: Mon, 11 Apr 2016 09:59:27 -0700 Organization: A noiseless patient Spider Message-ID: References: <56ff6352-590e-4de7-a361-bc2fec0538fb@googlegroups.com> <2db8b996-1c47-4789-97a8-075588598368@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 11 Apr 2016 16:56:10 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="48b46be33beed75863f69afa437f956b"; logging-data="28138"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+1/B5UxW0K6IFTW6ApD/H5N4Z4rElk/W0=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: <2db8b996-1c47-4789-97a8-075588598368@googlegroups.com> Cancel-Lock: sha1:qN46iVl8l9YVoSGy7hY/0g8v3M4= Xref: news.eternal-september.org comp.lang.ada:30073 Date: 2016-04-11T09:59:27-07:00 List-Id: On 04/11/2016 02:14 AM, Daniel Norber wrote: >> >> protected type Buffer (Size : Size_In_Characters) is >> procedure Put (Msg : String); >> entry Get (Msg : out String); >> private >> content : String (1 .. Size); >> end Buffer; > > 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" What was presented is a protected type specification. You had to provide the body, and clearly you made an error in so doing. The error msg gives you the information you need to correct this error. -- Jeff Carter "It is the German who is so uncourteous to his verbs." A Scandal in Bohemia 122