comp.lang.ada
 help / color / mirror / Atom feed
From: therionics@computer.org (Technobabble)
Subject: access type referencing nested array element
Date: 1998/09/19
Date: 1998-09-19T00:00:00+00:00	[thread overview]
Message-ID: <therionics-1809981907320001@a1.phoenix-21.goodnet.com> (raw)

Greetings,

Anyone know the syntax for referencing an array element (record) from an
access type pointing to an array of records ?


pointer -> array of records -> record

type xyz_rec is 
    record
      a : integer;
      b : integer;
    end record;

type xyz_array is array (1 .. 100) of xyz_rec;
type xyz_pointer is access xyz_array;


Here is my guess assuming that I want to get the 5th record in an array:
XYZ    :  xyz_pointer;
MY_XYZ :  xyz_rec;

assuming that the pointer XYZ has been assigned to an array of records .....

MY_XYZ := XYZ.xyz_array'(5);  or maybe

MY_XYZ := XYZ.xyz_array'(5).all;     or maybe I'm just guessing too much.


help..........

Thanks,
Richmond




             reply	other threads:[~1998-09-19  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-09-19  0:00 Technobabble [this message]
1998-09-19  0:00 ` access type referencing nested array element Dale Stanbrough
1998-09-19  0:00   ` Technobabble
1998-09-19  0:00     ` Tucker Taft
1998-09-19  0:00       ` dewarr
1998-09-19  0:00         ` Brian Rogoff
1998-09-20  0:00           ` Dale Stanbrough
1998-09-20  0:00             ` dewarr
1998-09-19  0:00       ` Tucker Taft
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox