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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e4042699db4db63b X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!news.skynet.be!195.238.0.222.MISMATCH!newsspl501.isp.belgacom.be!tjb!not-for-mail Date: Sun, 15 Mar 2009 14:46:49 +0100 From: Olivier Scalbert User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Newbie question References: <49b90e2d$0$2847$ba620e4c@news.skynet.be> In-Reply-To: <49b90e2d$0$2847$ba620e4c@news.skynet.be> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <49bd06c5$0$2854$ba620e4c@news.skynet.be> Organization: -= Belgacom Usenet Service =- NNTP-Posting-Host: 6b7f6091.news.skynet.be X-Trace: 1237124805 news.skynet.be 2854 87.65.167.233:58711 X-Complaints-To: usenet-abuse@skynet.be Xref: g2news1.google.com comp.lang.ada:4133 Date: 2009-03-15T14:46:49+01:00 List-Id: Olivier Scalbert wrote: > Hello, > > I start learning Ada and I try to define types for a chess engine. > > I have create some "obvious" types: > > type Color_T is (White, Black); > > type PieceType_T is (Pawn, Knight, Bishop, Rook, Queen, King); > > type Piece_T is record > Color: Color_T; > PieceType: PieceType_T; > end record; > > > Now, I want to create an array of 64 squares representing the chess > board. A square should contain nothing or a Piece_T > > I have tried: > > type Board_T is array(1..64) of Piece_T; > > But I can not have an empty square ! > > What is the best way of doing that ? > > Thanks, > > Olivier Thanks all of you for your interesting answers ! Olivier