comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: Object with zero bits
Date: Thu, 14 Oct 2004 10:13:09 +0200
Date: 2004-10-14T10:13:09+02:00	[thread overview]
Message-ID: <4730271.U8RaYIMhj8@linux1.krischik.com> (raw)
In-Reply-To: ckjns1$342$1@a1-hrz.uni-duisburg.de

Georg Bauhaus wrote:

> Wojtek Narczynski <wojtek@power.com.pl> wrote:
> : Hello,
> : 
> : You can declare a record that will have zero bits size. Is this what you
> : want?
> : 
> :   type Frame_Mark is null record;
> 
> And maybe add a rep clause,
> 
>    type Nothing_At_All is null record;
>    for Nothing_At_All'size use 0;

That's for the type. If you actually use the type:

X: Nothing_At_All;
Y : aliased Nothing_At_All;

then X'Size is could still be >0. And Y'Size must be >0  since Y need to
have an unshared address to be aliased.

Martin

-- 
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com




      parent reply	other threads:[~2004-10-14  8:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-13  6:15 Object with zero bits Robert C. Leif
2004-10-13 14:59 ` Nick Roberts
2004-10-13 15:18 ` Wojtek Narczynski
     [not found]   ` <ckjns1$342$1@a1-hrz.uni-duisburg.de>
     [not found]     ` <2t5jo2F1s56mgU1@uni-berlin.de>
2004-10-14  0:47       ` Georg Bauhaus
2004-10-14  2:14         ` Nick Roberts
2004-10-14 14:55           ` Georg Bauhaus
2004-10-14  8:13     ` Martin Krischik [this message]
replies disabled

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