comp.lang.ada
 help / color / mirror / Atom feed
From: cktan@kelly.teleport.com (Chong-Kwan Tan)
Subject: Help (gnat 3.04)
Date: 1996/06/10
Date: 1996-06-10T00:00:00+00:00	[thread overview]
Message-ID: <ssgafybjgo9.fsf@kelly.teleport.com> (raw)


Hi,

I am trying to link all items in an array into a list and gnat 3.04 gives
me this error:
    % gnatmake tt.adb
    gcc -c tt.adb
    tt.adb:21:37: object has deeper accessibility level than access type
    gnatmake: "tt.adb" compilation error

Could someone tell me why?

Thanks,
-tan

====================================================================
     1  procedure TT is
     2
     3     type Item_Type;
     4     type Item_Ptr_Type is access all Item_Type;
     5     type Item_Type is
     6        record
     7           Next           : Item_Ptr_Type;
     8        end record;
     9     type Item_Table_Type is
    10        array (Positive range <>) of aliased Item_Type;
    11
    12     type Pool_Type is
    13        record
    14           Item    : Item_Table_Type(1..10);
    15        end record;
    16
    17     procedure Init
    18       (Pool : in out Pool_Type) is
    19     begin
    20        for I in 2 .. Pool.Item'Last loop
    21           Pool.Item(I-1).Next := Pool.Item(I)'Access;
    22        end loop;
    23        Pool Pool.Item(I)'Access;
    22        end loop;
    23        Pool.Item(Pool.Item'Last).Next := null;
    24     end Init;
    25
    26     P : Pool_Type;
    27  begin
    28     Init(P);
    29  end TT;
-- 
cktan@teleport.COM  Public Access User --- Not affiliated with Teleport
Public Access UNIX and Internet at (503) 220-1016 (2400-28800, N81)




             reply	other threads:[~1996-06-10  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-10  0:00 Chong-Kwan Tan [this message]
1996-06-11  0:00 ` Help (gnat 3.04) Chong-Kwan Tan
1996-06-14  0:00 ` Nasser Abbasi
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox