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,5c7d7b754dfe430e X-Google-Attributes: gid103376,public From: "Matthew Heaney" Subject: Re: Help needed: Access type to functions in generic package Date: 1999/09/12 Message-ID: <37dc1a3f@news1.prserv.net>#1/1 X-Deja-AN: 524210460 Content-transfer-encoding: 7bit References: <37DBA86F.3805AA69@deathsdoor.com> <37dbe7da@news1.prserv.net> <37DBFEBF.B74D1958@deathsdoor.com> Content-Type: text/plain; charset="US-ASCII" X-Complaints-To: abuse@prserv.net X-Trace: 12 Sep 1999 21:25:19 GMT, 32.101.8.119 Organization: Global Network Services - Remote Access Mail & News Services Mime-version: 1.0 Newsgroups: comp.lang.ada Date: 1999-09-12T00:00:00+00:00 List-Id: In article <37DBFEBF.B74D1958@deathsdoor.com> , Zeiram wrote: >> Why is this package generic? Why don't you declare your array type this >> way: >> > > In fact, this was just a part of the definitions of my package. > In reality, my type T_Maze is declared as private. Then why not declare T_Maze as private, but with discriminants? package Maze is type T_Maze (X, Y, Z : Positive) is private; private type T_Maze_Array is array (Positive range <>, Positive range <>, Positive range <>) of T_Cell; type T_Maze (X, Y, Z : Positive) is record Items : T_Maze_Array (1 .. X, 1 .. Y, 1 .. Z); end record; end Maze; > This is due > to the fact that I also need to realize a dynamic implementation > of my software (yes, this a project from my CS course :-) ) I don't know what you mean by "realize a dynamic implementation." > It consequently seemed logical to create this package as a > generic one. I'm still not convinced you need a generic. > If I decide to use a non private type and do only a static > implementation, I know for sure your solution will work > perfect. (It was, in fact, the way I ran my first tests) I don't know what you mean by "static implementation." Does the private type above meet your needs? If not, why not?