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,3f267467312181f1 X-Google-Attributes: gid103376,public From: "Gil Kaspi" Subject: problem in changing Discriminants from access type Date: 1998/05/12 Message-ID: <35577418.0@news1.ibm.net>#1/1 X-Deja-AN: 352341750 X-Notice: should be forwarded in their entirety to postmaster@ibm.net X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 X-Trace: 11 May 1998 21:56:40 GMT, 139.92.98.190 Organization: IBM.NET Newsgroups: comp.lang.ada Date: 1998-05-12T00:00:00+00:00 List-Id: this program was build to simulate dynamic array . (it should be a package that has type arr is private; and arr defenition is access to arr_node) ---------------------------------------------------------------------------- ----------------- procedure d_array is type Arr_Node; type arr is access arr_node; type Test is array (Integer range <>) of Integer; subtype Int_Limits is Integer range -1000..1000; type Int_Arr is array (Int_Limits range <>) of Integer; type Arr_Node (Start : Int_Limits :=1; Ends : Int_Limits := 0) is record Store : Int_Arr (Start..Ends); end record; -- declare -- D_Arr : Arr; begin -- create -- D_Arr := new Arr_Node'(Start => 1, Ends => 0, Store => (others => 0)); -- change -- D_Arr.all :=(Ends => Index, Start => Index , Store => (others =>1)); end; ---------------------------------------------------------------------------- ------------------------ !!! first, writing this code without the access will work OK. running this code will raise CONSTRAINT_ERROR. the problem I think is hiding in the last line 10x 4 any1 that will help gil.