comp.lang.ada
 help / color / mirror / Atom feed
From: Preben Randhol <randhol+abuse@pvv.org>
Subject: Re: Null record
Date: Sat, 16 Aug 2003 09:10:00 +0000 (UTC)
Date: 2003-08-16T09:10:00+00:00	[thread overview]
Message-ID: <slrnbjrt60.i2.randhol+abuse@kiuk0152.chembio.ntnu.no> (raw)
In-Reply-To: 3f3db971_1@news.tm.net.my

Adrian Hoe wrote:
> Hi,
> 
> Just a silly question.
> 
> A null record can be implemented as follow:
> 
> Method 1:
> 
> type Blank is new Some_Record with null record;
> 
> Method 2:
> 
> type Blank is new Some_Record with
>     record
>        null;
>     end record;
> 
> 
> Which is the most popular form and why? I assume personal preference 
> influences the choice.

I think Method 1 was made particularily for this usage. I would say
Method 1 as Method 2 looks like incomplete code if you consider:

   procedure Do_Something_Callback (Object : T) is
   begin
      null;
   end Do_Something_Callback;

which could be automatically generated from a spec file.

-- 
�I think fish is nice, but then I think that rain is wet.
 So who am I to judge.�
                 - The Hitch Hiker's Guide to the Galaxy (radioplay)



  reply	other threads:[~2003-08-16  9:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-16  4:54 Null record Adrian Hoe
2003-08-16  9:10 ` Preben Randhol [this message]
2003-08-16 12:58 ` Matthew Heaney
replies disabled

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