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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7c0437014cb20f71 X-Google-Attributes: gid103376,public From: "David C. Hoos, Sr." Subject: Re: System.Address_to_Access_Conversions Date: 1998/07/14 Message-ID: #1/1 X-Deja-AN: 371535558 References: <6odddl$k94$1@nnrp1.dejanews.com> <35AB9C59.74E529E0@magic.fr> <6ofn8e$5ff$1@nnrp1.dejanews.com> <6ofqvs$alm@hacgate2.hac.com> <6ogieq$qlo@drn.newsguy.com> Newsgroups: comp.lang.ada X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Date: 1998-07-14T00:00:00+00:00 List-Id: nabbasi@earthlink.net wrote in message <6ogieq$qlo@drn.newsguy.com>... >In article <6ofqvs$alm@hacgate2.hac.com>, "David says... > >> Typically you will want to use a record representation clause to >>make the memory layout correspond to the harware requirements. Using a >>tagged type in such a sitiuation is not a good idea, because the tag is a >>"hidden" data field within the record which certainly will have no >>correspondence with the hardware-required memory layout. >> > >I read somewhere that the tag position within a record is always defined, >it is the first element always, right? not sure what's its size, I assume >it is an address to someother tag related information somewhere else, so its >size is also known, right? > I don't know where you read this information -- it is certainly not universally true -- i.e., it's not specified by the language. It might be true of some particular implementation. The location of the tag within a record is implementation-defined, and you can define where it _isn't_ by means of a representation clause which defines where everything else _is_. Typically, tags are accesses to the dispatch table, but, again, the size of an access to the dispatch table might not be known to the programmer. In any case beacuse of the address specified in Jay's original post (16#00E00000#) I guessed that he might be trying to overlay some memory-mapped hardware (e.g. video ram) with his data structure, and that just doesn't seem to me like an appropriate application of tagged types. I just wanted to warn of some difficulties I encountered when trying to use tagged types where memory layout had to meet some specification in which a tag was not part of the specified memory layout. I notice also, that Jay's response to my 6ofqvs$alm@hacgate2.hac.com post did not mention the tagged type problem at all, but did specify a tagged type. David C. Hoos, Sr.