From: prichtmyer@yahoo.com (Peter Richtmyer)
Subject: Re: Null Record is not always Null
Date: 10 Oct 2002 18:39:21 -0700
Date: 2002-10-11T01:39:21+00:00 [thread overview]
Message-ID: <1b585154.0210101739.a68aab2@posting.google.com> (raw)
In-Reply-To: wccn0pmpan6.fsf@shell01.TheWorld.com
Robert A Duff <bobduff@shell01.TheWorld.com> wrote in message news:<wccn0pmpan6.fsf@shell01.TheWorld.com>...
> I'm curious: why do you care what the size of a null record is,
> or an array of them? It's rather unusual to create large numbers of
> null records!
>
Thought somebody might ask. I am passing two structures (types) as
generic parameters to a generic package. For some instantiations of the
generic, one of the structures could be "null" - and I wanted to be
able to test for null by testing the T'size of that structure
in the generic package. But for portability I will probably pass a
separate numeric "type_T_size" parameter so I do not need to rely on T'size
being zero when it is null.
There was really no practical reason to create arrays of the null
record type, I was just curious. :-) or is it :-?
> Are you implying that you got this output with the above lines *not*
> commented out? If that's the case, then it's clearly a bug -- if the
> compiler isn't going to give back 0, then it shouldn't let you specify 0
> -- it must give a compile-time error.
>
My mistake - I meant to include the program without any lines commented
out. I got those results from Gnat with all source code "active". I think
it is a Gnat bug, but I am only running with the freebie Gnat right now.
thanks all,
Peter
prev parent reply other threads:[~2002-10-11 1:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-10 13:12 Null Record is not always Null Peter Richtmyer
2002-10-10 14:16 ` Colin Paul Gloster
2002-10-10 15:44 ` Robert A Duff
2002-10-10 16:44 ` Colin Paul Gloster
2002-10-10 17:28 ` Robert A Duff
2002-10-22 19:00 ` Randy Brukardt
2002-10-10 15:38 ` Robert A Duff
2002-10-11 1:39 ` Peter Richtmyer [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