From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: Unclear error message - please help
Date: Sun, 09 Oct 2005 09:29:25 +0200
Date: 2005-10-09T09:29:25+02:00 [thread overview]
Message-ID: <4894486.ZC6T0HgaI8@linux1.krischik.com> (raw)
In-Reply-To: 43482077.3434FCF3@alfred-hilscher.de
Alfred Hilscher wrote:
> subtype
> Sixteen_Bits is Integer range 0..65535;
The name "Sixteen_Bits" suggest a different implementation:
type Sixteen_Bits is mod 2 ** 16;
for Sixteen_Bits'Size use 16;
A "range 0..65535" needs 17 bits and an "is Integer" is usually 32 bit.
See
http://en.wikibooks.org/wiki/Ada_Programming/Types/range
http://en.wikibooks.org/wiki/Ada_Programming/Types/mod
for more info.
Martin
--
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com
next prev parent reply other threads:[~2005-10-09 7:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-17 21:11 Unclear error message - please help Alfred Hilscher
2005-09-17 21:44 ` Gene
2005-09-17 22:02 ` Ludovic Brenta
2005-09-18 2:32 ` Robert A Duff
2005-10-08 19:39 ` Alfred Hilscher
2005-10-08 20:15 ` Björn Persson
2005-10-09 7:34 ` Martin Krischik
2005-10-08 21:28 ` Dmitry A. Kazakov
2005-10-08 23:58 ` Robert A Duff
2005-10-09 7:29 ` Martin Krischik [this message]
2005-10-09 14:24 ` Robert A Duff
2005-10-09 22:02 ` Brian May
2005-10-10 16:49 ` Martin Krischik
2005-10-10 22:20 ` Brian May
2005-10-11 5:48 ` Martin Dowie
2005-10-11 18:03 ` Martin Krischik
[not found] ` <h84lk1tqgofrhgabm8q3sqbb80li6733bh@4ax.com>
2005-10-16 1:10 ` Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox