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-15 09:50:48 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: 15 Nov 2002 09:50:47 -0800 Organization: http://groups.google.com/ Message-ID: <5ad0dd8a.0211150950.4d550163@posting.google.com> References: <5ad0dd8a.0211131244.42603699@posting.google.com> <5ad0dd8a.0211140218.6d48be15@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 1037382647 30750 127.0.0.1 (15 Nov 2002 17:50:47 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 15 Nov 2002 17:50:47 GMT Xref: archiver1.google.com comp.lang.ada:30956 Date: 2002-11-15T17:50:47+00:00 List-Id: Robert, > As I said in my previous post, if you are used to doing this in C++ or > Java or whatever, what you want to do in Ada is declare dispatching > operations. They are declared *outside* the type. And the "self" > parameter is not passed by magic -- you just pass an ordinary > parameter. So the syntax is different from what you're used to, > but the semantics is pretty much the same. > > I think you really need to look at a tutorial or textbook on this. I have read the book "Rendezvous with Ada 95". I't just that protected type, task type and record type are all composite types, and you can put a function or procedure inside a protected or task type, but you cannot do this inside a record. So you sometimes declare them outside and sometimes inside. Don't you find it it's weird? Thought that maybe I am missing something. Dynamic dispatch on multiple attributes is the reason I got interested in Ada, but still putting a function inside a record would be good, such a calculated record member. Well, I guess I will have to live what is already there :-) Thanks & Regards, Wojtek