From: WishList@2600.com (Technobabble)
Subject: assigning record address using access, w/unconstrained array
Date: 1998/09/19
Date: 1998-09-19T00:00:00+00:00 [thread overview]
Message-ID: <WishList-1909982010140001@a11.phoenix-13.goodnet.com> (raw)
Greetings,
The following is the code I've got a gnat error with. This code is
relation to the previous array RANGE questions I've had.
--File: test_pkg.ads
package test_pkg is
--Types:
type xyz_array is array (integer range <>) of integer; -- this is it
type xyz_array_pointer is access all 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;
-- declarations:
xyz5_array : aliased xyz_array := (1..5 => 0);
procedure my_range (This : in Object);
end test_pkg;
---------------------
--File: test_pkg.adb
package body test_pkg is
procedure my_range (This : in Object) is
begin
This.XYZ(1) := xyz5_array'ACCESS;
-- rangexyz := This.XYZ(1)'RANGE;
end my_range;
end test_pkg;
--------------------
GNAT produces the following error after compiling test_pkg.adb:
test_pkg.adb:18:17: assignment to "in" mode parameter not allowed
******
After I comment out the suspect line:
This.XYZ(1) := xyz5_array'ACCESS; -- address of xyz_array
type is assigned
and put a null in the procedure 'my_range' it compiles fine. As for the
RANGE attribute, well I just have not been able to get to it yet since the
line above it bombs.
******
HELP !!
thanks,
Richmond
therionics@computer.org
next reply other threads:[~1998-09-19 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-09-19 0:00 Technobabble [this message]
1998-09-19 0:00 ` assigning record address using access, w/unconstrained array Tucker Taft
1998-09-19 0:00 ` Technobabble
1998-09-20 0:00 ` dewarr
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox