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,80435549e92d4e0c X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news1.optus.net.au!optus!newsfeeder.syd.optusnet.com.au!news.optusnet.com.au!newsfeed.pacific.net.au!nasal.pacific.net.au!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Charles container library usage examples From: David Trudgett Organization: Very little? References: <87mzmssqbq.fsf@ludovic-brenta.org> <87psrmrdfz.fsf@ludovic-brenta.org> Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:T9GeirMXu2NMQAkJhefkqeb6DF4= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 06 Sep 2005 16:46:10 +1000 NNTP-Posting-Host: 61.8.43.95 X-Complaints-To: news@pacific.net.au X-Trace: nasal.pacific.net.au 1125989440 61.8.43.95 (Tue, 06 Sep 2005 16:50:40 EST) NNTP-Posting-Date: Tue, 06 Sep 2005 16:50:40 EST Xref: g2news1.google.com comp.lang.ada:4464 Date: 2005-09-06T16:46:10+10:00 List-Id: Ludovic Brenta writes: > David Trudgett writes: >> 1. Is my INITIALIZE procedure more verbose than it needs to be? I >> wanted to put the array definitions inside the call to INSERT, but >> I don't think that's possible. > > procedure Initialize (Self : in out Board) is > begin > Reset(Self); > Insert(Side_Corners, 2, (1, 3)); > Insert(Side_Corners, 4, (1, 7)); > Insert(Side_Corners, 6, (3, 9)); > Insert(Side_Corners, 8, (7, 9)); > end Initialize; Oops! Well, how about that! I thought I tried that, but obviously not. I've changed it now and it works fine! Thank you. > >> 2. Did I need the separate file "corner_list.ads"? I tried to put it >> in "side_corners_map.ads", but the compiler didn't seem to like >> that idea. > > Yes, you need one because Side_Corner_Maps must be instantiated at > "library level". This prevents dangling references to nested types. OK ;-) I'll take your word for it... ;-) Cheers, David -- David Trudgett http://www.zeta.org.au/~wpower/ "Nasty, tricksy parenthesises. We hates them!" -- Sampo Smolander