comp.lang.ada
 help / color / mirror / Atom feed
From: wojtek@power.com.pl (Wojtek Narczynski)
Subject: Re: A bunch of questions that come after "Hello world"
Date: 15 Nov 2002 09:50:47 -0800
Date: 2002-11-15T17:50:47+00:00	[thread overview]
Message-ID: <5ad0dd8a.0211150950.4d550163@posting.google.com> (raw)
In-Reply-To: wccisyzvmzw.fsf@shell01.TheWorld.com

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



  reply	other threads:[~2002-11-15 17:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-13 20:44 A bunch of questions that come after "Hello world" Wojtek Narczynski
2002-11-13 20:57 ` Robert A Duff
2002-11-14 10:18   ` Wojtek Narczynski
2002-11-14 11:21     ` David C. Hoos, Sr.
2002-11-14 19:51     ` tmoran
2002-11-14 21:51     ` Robert A Duff
2002-11-15 17:50       ` Wojtek Narczynski [this message]
2002-11-15 23:07         ` Robert A Duff
2002-11-18 10:24           ` Wojtek Narczynski
2002-11-18 11:54             ` Dmitry A. Kazakov
2002-11-18 16:24               ` Wojtek Narczynski
2002-11-18 21:19                 ` Robert A Duff
2002-11-19  8:48                 ` Dmitry A. Kazakov
2002-11-13 22:06 ` Martin Dowie
2002-11-14 17:48   ` Pascal Obry
2002-11-14 18:53     ` David C. Hoos
2002-11-14 22:36     ` Martin Dowie
2002-11-15  1:25       ` Jeffrey Carter
2002-11-13 22:31 ` Stephen Leake
  -- strict thread matches above, loose matches on Subject: below --
2002-11-18 10:32 Grein, Christoph
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox