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/15 Message-ID: <6ojc8p$7fu@hacgate2.hac.com>#1/1 X-Deja-AN: 371836394 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> <6oj1qi$n37$1@nnrp1.dejanews.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: Hughes Aircraft Company Newsgroups: comp.lang.ada Date: 1998-07-15T00:00:00+00:00 List-Id: jsanchor@my-dejanews.com wrote in message <6oj1qi$n37$1@nnrp1.dejanews.com>... >After reading all the comments from all who have responded I am >worried because I also thought that the TAG was the first element in the >record. I have tampered with my program ~100 times and it did stay there. (I >am not saying you are wrong just pondering). > Well, for a given version of a given compiler, that may well be the case. With gnat, I found (as I said in an earlier post) that I could control where that tag _isn't_ by using a representation clause to define where everything else _is_. As some have pointed out, there is no requirement that the tag even be present in the memory layout, so I wouldn't depend on the tag being there, if it were I. For portability, I would consider using stream I/O to read and write the data to NVM. Then you would have a portable representation -- i.e., the _external_ tag -- written in memory. You _could_ use the implementation's default external tag value for each type, but for portability I would define the external_tag for each type using an attribute definition clause. In such a case, the data type which you would be referencing in the System.Address_to_Access_Conversion instantiation would be an array of stream_elements. Just for what it's worth -- I hope a little more than two cents! David C. Hoos, Sr.