From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,47208e1e64e89fe0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-10 18:39:21 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!postnews1.google.com!not-for-mail From: prichtmyer@yahoo.com (Peter Richtmyer) Newsgroups: comp.lang.ada Subject: Re: Null Record is not always Null Date: 10 Oct 2002 18:39:21 -0700 Organization: http://groups.google.com/ Message-ID: <1b585154.0210101739.a68aab2@posting.google.com> References: <1b585154.0210100512.54af8543@posting.google.com> NNTP-Posting-Host: 140.186.33.93 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1034300361 11670 127.0.0.1 (11 Oct 2002 01:39:21 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 11 Oct 2002 01:39:21 GMT Xref: archiver1.google.com comp.lang.ada:29700 Date: 2002-10-11T01:39:21+00:00 List-Id: Robert A Duff wrote in message news:... > 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