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,5ac1c1813029999b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-14 02:18:56 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: wojtek@power.com.pl (Wojtek Narczynski) Newsgroups: comp.lang.ada Subject: Re: A bunch of questions that come after "Hello world" Date: 14 Nov 2002 02:18:56 -0800 Organization: http://groups.google.com/ Message-ID: <5ad0dd8a.0211140218.6d48be15@posting.google.com> References: <5ad0dd8a.0211131244.42603699@posting.google.com> NNTP-Posting-Host: 217.98.138.16 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1037269136 11782 127.0.0.1 (14 Nov 2002 10:18:56 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 14 Nov 2002 10:18:56 GMT Xref: archiver1.google.com comp.lang.ada:30861 Date: 2002-11-14T10:18:56+00:00 List-Id: Robert A Duff wrote in message news:... > wojtek@power.com.pl (Wojtek Narczynski) writes: > > > 2. Could somebody confirm that I cannot define a procedure / function > > as a member of a "record", but I sure can as a member of "protected"? > > You can define a record component of an access-to-subprogram type. > But what you probably want is a dispatching subprogram of a tagged type. > The code below illustrates my dillema. package Test is -- why not: 'type Door is protected'? -- Is this because protected_type_declaration -- is supposed to resemble task_type_declaration? protected type Door is procedure Open; procedure Close; function Can_Go_Thru return Boolean; private State: Boolean := False; end Door; type Door_Nogo is record -- can't put function / procedure here? -- procedure Open; -- procedure Close; -- function Can_Go_Thru return Boolean; Status: Boolean := False; end record; end Test; I have two more questions: 1. Is there something like super in Java? 2. Can I overload () operator? I guess no. Thanks for pointing me at collection class libraries, although I am a bit overwhelmed by the wealth. Regards, Wojtek