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,ca21162c929cc36f X-Google-Attributes: gid103376,public From: mab@dst17.wdl.loral.com (Mark A Biggar) Subject: Re: Implementing pointers to pointers in Ada Date: 1996/09/09 Message-ID: <511b9a$arb@wdl1.wdl.lmco.com>#1/1 X-Deja-AN: 179468350 references: organization: Loral Western Development Labs newsgroups: comp.lang.ada Date: 1996-09-09T00:00:00+00:00 List-Id: In article Vasilios Tourloupis writes: >Dear Ada users, >As the title suggests, how would I go about implementing pointers to >pointers in Ada? >For example, I have declared the following variable in C: > unsigned **a; >How would this be expressed in Ada terms? type unisgned is ... ; type u_ptr is access all unsigned; type u_ptr_ptr is access all u_ptr; a: u_ptr_ptr; But, as ** variables in C a most often used to walk through C arrays of pointer with ++, and you just don't manipulate arrays in Ada that way, such declarations almost never appear in Ada programs. It usually makes more sense (if translating a C algorithm to Ada) to redesign the algorithm to use array indexing, then to emulate the C double indirection. -- Mark Biggar mab@wdl.lmco.com