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,2afac1a4161c7f35 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Two simple language questions Date: 1998/01/07 Message-ID: #1/1 X-Deja-AN: 313624416 References: <68uq34$7tk@tomquartz.niestu.com> X-Complaints-To: usenet@news.nyu.edu X-Trace: news.nyu.edu 884182005 8615 (None) 128.122.140.58 Organization: New York University Newsgroups: comp.lang.ada Date: 1998-01-07T00:00:00+00:00 List-Id: Chip asks <> I expect others will answer with the obvious use of 'Access on objects so I won't repeat that here. I will note that you can find a nice example of this use in the gnatcmd utility in the GNAT sources. In general I think those who like learning from examples :-) may find it useful to browse the GNAT sources for useful stuff. The stand alone utilities like gnatcmd are quite accessible, as are many of the runtime library routines. Even the main compiler code is reasonable to get into. Second, the form with allocators, if used at the outer level in a library package, does not seem particularly more or less static than the form with the use of 'Access. Here I am using static in an informal sense to mean no elaboration code at runtime, which is not quite what static means in Ada, and is also, a bit surprisingly, not quite what Preelaborate means. A compiler might or might not generate code for the use quoted above of allocators, it is certainly quite reasonable that it should not. A compiler might or might not generate code for the use of 'Access in an aggregate, it is certainly quite reasonable that it should not. So don't jump to conclusions too fast :-)