From: wojtek@power.com.pl (Wojtek Narczynski)
Subject: Re: A bunch of questions that come after "Hello world"
Date: 14 Nov 2002 02:18:56 -0800
Date: 2002-11-14T10:18:56+00:00 [thread overview]
Message-ID: <5ad0dd8a.0211140218.6d48be15@posting.google.com> (raw)
In-Reply-To: wcck7jhfar3.fsf@shell01.TheWorld.com
Robert A Duff <bobduff@shell01.TheWorld.com> wrote in message news:<wcck7jhfar3.fsf@shell01.TheWorld.com>...
> 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
next prev parent reply other threads:[~2002-11-14 10:18 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 [this message]
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
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