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: g2news2.google.com!news4.google.com!feeder.news-service.com!feed.xsnews.nl!border-1.ams.xsnews.nl!feeder3.cambriumusenet.nl!feed.tweaknews.nl!195.238.0.231.MISMATCH!news.skynet.be!195.238.0.222.MISMATCH!newsspl501.isp.belgacom.be!tjb!not-for-mail Date: Sat, 21 Mar 2009 19:08:50 +0100 From: Olivier Scalbert User-Agent: Thunderbird 2.0.0.21 (X11/20090318) 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: <49c52d2f$0$2856$ba620e4c@news.skynet.be> Organization: -= Belgacom Usenet Service =- NNTP-Posting-Host: 9b753c40.news.skynet.be X-Trace: 1237658927 news.skynet.be 2856 87.65.223.120:55475 X-Complaints-To: usenet-abuse@skynet.be Xref: g2news2.google.com comp.lang.ada:5179 Date: 2009-03-21T19:08:50+01:00 List-Id: Hi all, I have write some more chess code, and I have another question ! Code can be browsed there: http://scalbert.dyndns.org/adachess/ Inside board.adb there is a procedure: Move_King(Board: Board_T; Color: Color_T; Moves_List: in out Moves_List_T; From: Position_T) is Inside this procedure, I have something strange, line 39. if Col > 1 then -- ERROR should be From.Col ... should be: if From.Col > 1 then .... I do not understand how this code can compile, because Col is not defined there. Perhaps it is because of the way I call it ? This procedure is called from Generate_All_Moves: ... when King => Move_King(Board, Color, Moves_List, (col, row)); ... I must have done a big mistake (my fist program in Ada ...), but I do not know where. I am sure you will have a good explanation ! Thanks to help me, Olivier