Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with Ada.Text_IO;
- with Ada.Unchecked_Deallocation;
- procedure Aufgabe12b is
- type IntArr is array (Integer range <>) of Integer;
- type Ptr is access IntArr;
- procedure Free is new Ada.Unchecked_Deallocation (IntArr, Ptr);
- P : Ptr := new IntArr (1 .. 2000000);
- Q : Ptr;
- begin
- P.all := (others => 4);
- Q := P;
- Ada.Text_IO.Put_Line (Integer'Image (Q (1)));
- Free (P);
- Ada.Text_IO.Put_Line (Integer'Image (Q (1)));
- end Aufgabe12b;
Add Comment
Please, Sign In to add comment