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-7-bit X-Google-Thread: 103376,d11e75ead27d62f5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-01 16:06:41 PST Path: archiver1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!wn14feed!wn13feed!wn11feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!attbi_s04.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: how to declare an array of pointers References: X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 12.234.124.41 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s04 1067731486 12.234.124.41 (Sun, 02 Nov 2003 00:04:46 GMT) NNTP-Posting-Date: Sun, 02 Nov 2003 00:04:46 GMT Organization: Comcast Online Date: Sun, 02 Nov 2003 00:04:46 GMT Xref: archiver1.google.com comp.lang.ada:1912 Date: 2003-11-02T00:04:46+00:00 List-Id: >> type Array_Hash_type is array (10..HASH_SIZE) of p_node; >i dont understand how do i access an elemnt? > >Array_Hash_type(index).something If you have a particular array, say Main_Hash : Array_Hash_type; then Main_Hash(i).all is whatever whatever that particular p_node points to. In common cases you can skip the ".all", eg, if type Data is record Is_First_Name : Boolean; Name : String(1 .. 5); end record; type P_Node is access Data; then Main_Hash(i).Is_First_Name is the boolean in the Data record at p_node, and Main_Hash(i).Name(1) is the first character in the string at p_node, and so forth. >thanks now i have to change all my program Surely you didn't "code first, ask questions later"! ;) >where can i find example on the net? In addition to the ones noted, you might do a search at www.adaic.com/site/wide-search.html In particular, look for things in the online Style and Quality guide. Also as noted, there are often better ways than using pointers to accomplish things in Ada.