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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: put of access type References: From: Stephen Leake Date: Fri, 21 Aug 2009 04:24:03 -0400 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (windows-nt) Cancel-Lock: sha1:rjg25PSOWst2pKdYaIDpOus4UJ0= MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: d8cf54a8e598ce197caa731017 Xref: g2news1.google.com comp.lang.ada:6964 Date: 2009-08-21T04:24:03-04:00 List-Id: Adam Beneschan writes: > On Aug 20, 1:05�am, Stephen Leake > wrote: >> Dennis Lee Bieber writes: >> >> > On Tue, 18 Aug 2009 23:36:15 -0400, Rob Solomon >> > declaimed the following in comp.lang.ada: >> >> >> The only way I know to see the results of my playing is to output >> >> them. >> >> > � �And what meaning would some address from either the stack or a heap >> > have? You can't modify them -- Ada's access types are so heavily >> > controlled they are basically black boxes with no inherent meaning. >> >> Yes, but seeing the actual values helps the learning process. > > I don't see how. Ok. For you, personally, this style of learning doesn't help. For the OP, and for me, it does. Let it go at that. >> A : aliased Interfaces.Unsigned_32; >> B : aliased Interfaces.Unsigned_32; >> >> begin >> � � Put (To_Integer (A'access)); >> � � Put (To_Integer (B'access)); >> >> The results should be 4 bytes apart. > > Ummm... why? What rule in Ada says that the compiler has to put A and > B next to each other? Ok. To be pedantic, I should have said "in practice, for most compilers on most targets, the results will be 4 bytes apart". When focussing on implementations, you do need to be aware that some targets are significantly different than mainstream ones. However, learning some implementation details for the mainstream processors can help in understanding how a language works. Thinking of an access value as an address helps you understand how it works. Thinking of it as mysterious magic does not. -- -- Stephe