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=-2.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MAILING_LIST_MULTI autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,54e6f3bfd18d2769 X-Google-Attributes: gid103376,public From: Mario Amado Alves Subject: Re: Pointer function parameter Date: 2000/10/19 Message-ID: #1/1 X-Deja-AN: 683304513 To: comp.lang.ada@ada.eu.org X-Authentication-Warning: lexis.di.fct.unl.pt: maa owned process doing -bs Content-Type: TEXT/PLAIN; charset=US-ASCII X-Complaints-To: usenet@enst.fr X-Trace: menuisier.enst.fr 971952191 25243 137.194.161.2 (19 Oct 2000 10:43:11 GMT) Organization: ENST, France List-Id: comp.lang.ada mail<->news gateway X-Mailman-Version: 2.0beta5 X-BeenThere: comp.lang.ada@ada.eu.org Mime-Version: 1.0 Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Date: 19 Oct 2000 10:43:11 GMT Newsgroups: comp.lang.ada Date: 2000-10-19T10:43:11+00:00 On Wed, 18 Oct 2000, Robert Dewar wrote: > In article > , > comp.lang.ada@ada.eu.org wrote: > > Ada access types serve most pointer necessities. In this vein, > the > > Ada expression X'Access is the equivalent of the C expression > &X (X being > > an object). > > > Misleading, since &x is a somewhat fundamental C diction, > whereas X'Access is rather specialized, and has few legitimate > uses outside certain well defined areas (including for example > interfacing to C functions :-) The "in this vein" is there for a reason: in the vein of using Ada access types for the same purposes you use C pointer types for--and only in this vein--, attribute Access is in fact the Ada equivalent of the C address operator &. The equivalent strito senso--not in the vein above--is of course attribute Address. But if you use Address everywhere where you use & in the equivalent C program, you miss a great part of the gain of using Ada instead of C. (Perhaps you read "Address" where it says "Access" in my first reply?) And surely there is a _lot_ of uses of access types besides interfacing to C: virtually all dynamic data structures (linked lists, trees, etc.) require them. | |,| | | |RuaFranciscoTaborda24RcD 2815-249CharnecaCaparica 351+939354005 |M|A|R|I|O| |A|M|A|D|O|DepartmentoDeInformaticaFCT/UNL 2825-114 Caparica 351+212958536 |A|L|V|E|S| fax 212948541 | | | | | | maa@di.fct.unl.pt FCT 212948300