comp.lang.ada
 help / color / mirror / Atom feed
* access type referencing nested array element
@ 1998-09-19  0:00 Technobabble
  1998-09-19  0:00 ` Dale Stanbrough
  0 siblings, 1 reply; 9+ messages in thread
From: Technobabble @ 1998-09-19  0:00 UTC (permalink / 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




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~1998-09-20  0:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-09-19  0:00 access type referencing nested array element Technobabble
1998-09-19  0:00 ` 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

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