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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b0f4738b8e27cca3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-25 10:31:36 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fr.ip.ndsoftware.net!npeer.de.kpn-eurorings.net!rz.uni-karlsruhe.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail From: "Ekkehard Morgenstern" Newsgroups: comp.lang.ada Subject: Re: Problem with protected type Date: Tue, 25 Nov 2003 19:31:38 +0100 Organization: 1&1 Internet AG Message-ID: References: NNTP-Posting-Host: p508c004b.dip0.t-ipconnect.de X-Trace: online.de 1069785095 1188 80.140.0.75 (25 Nov 2003 18:31:35 GMT) X-Complaints-To: abuse@einsundeins.com NNTP-Posting-Date: Tue, 25 Nov 2003 18:31:35 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Xref: archiver1.google.com comp.lang.ada:2932 Date: 2003-11-25T19:31:38+01:00 List-Id: "Jeffrey Carter" schrieb im Newsbeitrag news:uPMwb.14566$n56.8738@newsread1.news.pas.earthlink.net... > > The compiler reports "premature usage of incomplete type derived from > > "BaseEvent"". > > That's not a great error message. That's true, because CoreEvent is not derived from BaseEvent. I already figured it had to do with the CoreEvent component instantiation, but the message is strange indeed. > I suspect that your real problem is that you omitted the word "type" > between "protected" and "Baseevent". "protected Baseevent" declares a > single protected object; "protected type Baseevent" declares a type > which may then be used to declare many objects of the type. Thank you! I completely overlooked that! ;-) > A type declaration may include a reference to an incomplete type, such > as Coreevent. An object declaration may not, since it has to allocate > space for the components, and the compiler does not yet know how much > space needs to be allocated for Coreevent. Ok. It's clear to me now! :-) I thought I was creating a type, not a object. But of course it seems logical that "type" would be required to designate a type. ;-) > > Can I use a barrier expression that is doing a function call? > > Yes, a barrier can be any boolean expression. If you limit yourself to > the Ravenscar profile, however, a barrier must be a Boolean component of > the object. What is the Ravenscar profile? And why would a barrier be limited to a Boolean component then? > BTW, I find the Ada way, Base_Event, much easier to read than Baseevent, > which is what my reformatter does with your kind of identifiers. Ok. I can change it, I always fear I clash with predefined names, and thought the contracted version would be less a candidate for that. But as far as I understand, the default namespace includes only the Standard package, right? BTW, are there any predefined Lists, Queues, Events, Message Queues, and Containers I could use? I didn't find anything in the Ada 95 reference.