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-Thread: a07f3367d7,bfad7b01b410c9fb,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.glorb.com!news-in-01.newsfeed.easynews.com!easynews!core-easynews-01!easynews.com!en-nntp-07.dc1.easynews.com.POSTED!not-for-mail From: Rob Solomon Newsgroups: comp.lang.ada Subject: Pointer types (I mean access types) Message-ID: X-Newsreader: Forte Agent 4.2/32.1118 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@easynews.com Organization: Forte Inc. http://www.forteinc.com/apn/ X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly. Date: Fri, 10 Jul 2009 20:03:48 -0400 Xref: g2news2.google.com comp.lang.ada:6966 Date: 2009-07-10T20:03:48-04:00 List-Id: I am trying to understand how pointers work in Ada. I would like to know if I have the correct equivalencies Assume this declaration: type List_Node; -- An incomplete type declaration. type List_Node_Access is access List_Node; type List_Node is record Data : Integer; Next : List_Node_Access; end record; Ada Modula-2 (or Pascal) -------------------------------- ---------------------- type Node_Access is access Node; TYPE NodeAccess = POINTER TO Node; Start : Node_Access; VAR Start : NodeAccess; Current := new Node; Current := NEW(Node); Current := Start; Current := Start; Current.all := Start.all; Current^ := Start^; Current.Data := 5; Current^.Data := 5; I never learned C or derivatives. So comparisons to C don't help me. Thanks