fork download
  1. procedure Test is
  2. type Cat is null record;
  3. type Cats is array(Positive range <>) of Cat;
  4. type Access_Cats is access Cats;
  5. function Allocate_Cats return Access_Cats is
  6. begin
  7. return new Cats'(Cat'(null record), Cat'(null record));
  8. end Allocate_Cats;
  9. Kitty : Cat;
  10. function Two return Positive is
  11. begin
  12. return 2;
  13. end Two;
  14. begin
  15. Kitty := Allocate_Cats(Two);
  16. end Test;
Success #stdin #stdout 0s 17152KB
stdin
Standard input is empty
stdout
Standard output is empty