From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: "Constraint Error: Range Check" That Does Not Always Occur
Date: Thu, 22 Nov 2007 04:56:42 -0500
Date: 2007-11-22T04:56:42-05:00 [thread overview]
Message-ID: <u63zueh7p.fsf@stephe-leake.org> (raw)
In-Reply-To: 474531FD.5090401@free.fr
Damien Carbonne <damien.carbonne@free.fr> 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
next prev parent reply other threads:[~2007-11-22 9:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-22 6:42 "Constraint Error: Range Check" That Does Not Always Occur DarthBob88
2007-11-22 7:38 ` Damien Carbonne
2007-11-22 9:12 ` anon
2007-11-22 9:56 ` Stephen Leake [this message]
2007-11-26 18:38 ` Adam Beneschan
2007-11-22 9:47 ` Stuart
2007-11-22 14:14 ` Matthew Heaney
2007-11-23 3:48 ` DarthBob88
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox