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-Thread: a07f3367d7,e55245590c829bef X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news4.google.com!news3.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Mart van de Wege Newsgroups: comp.lang.ada Subject: Re: Beginners question: Compound types, how-to? Date: Mon, 01 Nov 2010 08:14:38 +0100 Message-ID: <86lj5d5xcx.fsf@gareth.avalon.lan> References: <86wroy58ff.fsf@gareth.avalon.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net 7k0eoCcYbawvciQAawnrHwzNn4GLOjPv9+59B+wgmgZVdnE9oB X-Orig-Path: gareth.avalon.lan!not-for-mail Cancel-Lock: sha1:vBA4q+wcmGajFBh3y+2nhnSucSY= sha1:XYu5Cx3g+QPJ9Z3so57obBgr4Ls= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Xref: g2news1.google.com comp.lang.ada:15088 Date: 2010-11-01T08:14:38+01:00 List-Id: "Yannick DuchĂȘne (Hibou57)" writes: > Le Sun, 31 Oct 2010 23:36:29 +0100, Vinzent Hoefler > a Ă©crit: >>> procedure Test_Game is >>> C : Character; >> >> Try "C : Games.RPG.Dnd.Character" here. >> >>> begin >>> C.Abilities(Str) := (Score => 10, Modifier => -1); >>> Put (C.Abilities(Str).Score); >>> put (C.Abilities(Str).Modifier); >>> end Test_Game; >> > I suspect you're clashing with the predefined "Character" type here. > Yes, I was. Silly C experience led me to believe 'Character' was a perfectly fine identifier. > I suppose the compiler here is GNAT, like near to every time, but > would be nice to confirm. Would be interesting to know if this is GNAT > specific or not (or else if indeed the reference manual has something > saying one cannot hide a declaration of package Standard). > Yup, this was GNAT, as currently packaged in Debian unstable. Mart -- "We will need a longer wall when the revolution comes." --- AJS, quoting an uncertain source.