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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,aa7f494bf30adbc7 X-Google-Attributes: gid103376,public Path: g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 13 Jun 2004 18:32:44 -0500 Date: Sun, 13 Jun 2004 19:32:43 -0400 From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: [newbie] simple(?) data structures References: <2j1e30Fsrg8vU1@uni-berlin.de> <2j21dlFrvu2sU1@uni-berlin.de> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <-rednX6oT5GBeVHdRVn-ig@comcast.com> NNTP-Posting-Host: 24.147.90.114 X-Trace: sv3-5gdJc5OiHO9A0wGEbBhJkWFzLeqKfW36XvbQQwwDWVmMOhMOU1VXjfmKMvY4MdQ35HJBXYKH+w8RT5+!luUXWLZUdf5GWmcFNC4FYV1eX9ynEe84GuT4tlfouBIVDLnB5hD6wa09YXbXTg== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: g2news1.google.com comp.lang.ada:1455 Date: 2004-06-13T19:32:43-04:00 List-Id: Georg Bauhaus wrote: > As has been suggested, you don't need a whole lot of language > support to build the abstraction. For example, if only the size > of the board is a variable property of a Go board (once, when a > variable of type Go_Board is declared), type extensions are not > needed, neither are generics. > When there are no other properties that need to be seen from the > outside, then with a suitably defined Board_Size index type, > > type Go_Board (rows, columns: Board_Size) is private; > > -- ... subprogram declarations of the type Go_Board... Roland wanted the number of rows to always equal the number of columns so I would reccommend instead: type Go_Board(Size : Board_Size := 19) is private; ... private type Go_Board(Size : Board_Size := 19) is record Cells: Cell_Array(1..Size, 1..Size); end record; -- Robert I. Eachus The ideology he opposed throughout his political life insisted that history was moved by impersonal tides and unalterable fates. Ronald Reagan believed instead in the courage and triumph of free men and we believe it all the more because we saw that courage in him. -- George W. Bush June 11, 2004