From: "Gil Kaspi" <kaspi@ibm.net>
Subject: problem in changing Discriminants from access type
Date: 1998/05/12
Date: 1998-05-12T00:00:00+00:00 [thread overview]
Message-ID: <35577418.0@news1.ibm.net> (raw)
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.
next reply other threads:[~1998-05-12 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-05-12 0:00 Gil Kaspi [this message]
1998-05-11 0:00 ` problem in changing Discriminants from access type Matthew Heaney
1998-05-11 0:00 ` Lowe Anthony A
1998-05-11 0:00 ` Matthew Heaney
1998-05-12 0:00 ` Anonymous
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox