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,2ac1e7c090dd0c4a X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!news.glorb.com!uns-out.usenetserver.com!news.usenetserver.com!pc03.usenetserver.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: "Constraint Error: Range Check" That Does Not Always Occur References: <86ddf1f4-c7be-4729-8480-bae618b6d296@a39g2000pre.googlegroups.com> <474531FD.5090401@free.fr> From: Stephen Leake Date: Thu, 22 Nov 2007 04:56:42 -0500 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/22.1 (windows-nt) Cancel-Lock: sha1:gtxWsX3BPi8bPbTW5v+JZnz35JM= MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: dd48447455257e05e48ed25334 Xref: g2news1.google.com comp.lang.ada:18562 Date: 2007-11-22T04:56:42-05:00 List-Id: Damien Carbonne writes: > DarthBob88 a �crit : >> package Random_Die is new Ada.Numerics.Discrete_Random (Die); > Here you instantiate Discrete_Random with Die. > Change Die to Dice, it should work. >> D4 := Random(G); > Here, Random should have been instantiated with Dice. If you had used types, instead of subtypes, for Die and Dice, Ada would have warned you about this mistake. -- -- Stephe