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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,72c538d48d9fcd8a,start X-Google-Attributes: gid103376,public From: WishList@2600.com (Technobabble) Subject: assigning record address using access, w/unconstrained array Date: 1998/09/19 Message-ID: #1/1 X-Deja-AN: 392808414 Organization: WannaBeACracker NNTP-Posting-Date: Sat, 19 Sep 1998 13:09:09 MDT Newsgroups: comp.lang.ada Date: 1998-09-19T00:00:00+00:00 List-Id: 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