comp.lang.ada
 help / color / mirror / Atom feed
* unconstrained array clarification
@ 1998-09-19  0:00 Technobabble
  1998-09-19  0:00 ` Tucker Taft
  1998-09-19  0:00 ` dewarr
  0 siblings, 2 replies; 6+ messages in thread
From: Technobabble @ 1998-09-19  0:00 UTC (permalink / raw)


Ok, thanks !  Now what if all I have is an unconstrained array type like this:

type xyz_array is array (integer <>) of integer;   -- this is it
type xyz_array_pointer is access xyz_array;
type xyz_array_pointer_array is array (1..100) of xyz_array_pointer;


type Object is
    record
       XYZ : xyz_array_pointer_array;    
       abc : integer;
    end record;


Now I declare an Object,

This : Object;   --  record is not constrained, legal or not?

Now I want to have say a 5 element xyz_array:

xyz5_array : xyz_array (1..5);

and I assign my pointer

This.XYZ(1) := xyz5_array'ACCESS;  -- address of xyz_array type is assigned

now I want to loop:

for I in This.XYZ(1)'RANGE
     loop 
      ..........


???? Will this work ???  Is the syntax totally incorrect ???

help !!!

Richmond




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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-09-19  0:00 unconstrained array clarification Technobabble
1998-09-19  0:00 ` Tucker Taft
1998-09-19  0:00   ` Technobabble
1998-09-19  0:00     ` dewarr
1998-09-22  0:00     ` Robert I. Eachus
1998-09-19  0:00 ` dewarr

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