comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <jrcarter@acm.org>
Subject: Re: type declaration and storage requirements
Date: Mon, 03 Jun 2002 02:26:00 GMT
Date: 2002-06-03T02:26:00+00:00	[thread overview]
Message-ID: <3CFAD3B1.E6E0E290@acm.org> (raw)
In-Reply-To: bebbba07.0206021321.a3bbfac@posting.google.com

Russ wrote:
> 
> Ada allows me to specify the number of digits and the range of a
> floating-point type, or the delta and range of a fixed-point type.
> This gives more control than, say, C/C++, which only allows me to
> specify single or double precision. What bothers me, however, is that
> I apparently need to do some homework of my own to determine if my
> declaration will require one or two words for storage (for a
> particular word size).

You should define your own types when the precision and range are
application defined and important, and the specific representation is
not.  "digits X" only specifies a minimum precision; the actual
representation may give you more. If the representation is important and
the precision is not, then you probably need the types defined in
package Interfaces.

-- 
Jeff Carter
"Oh Lord, bless this thy hand grenade, that with it thou
mayst blow thine enemies to tiny bits, in thy mercy."
Monty Python and the Holy Grail



  parent reply	other threads:[~2002-06-03  2:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-02 21:21 type declaration and storage requirements Russ
2002-06-02 23:54 ` martin.m.dowie
2002-06-03  0:40   ` Dale Stanbrough
2002-06-03 11:10     ` martin.m.dowie
2002-06-04  2:40       ` Dale Stanbrough
2002-06-03  6:58   ` Russ
2002-06-03  7:57     ` AG
2002-06-03 11:19     ` martin.m.dowie
2002-06-03 12:40     ` Larry Kilgallen
2002-06-03 13:12     ` Gautier
2002-06-03  2:26 ` Jeffrey Carter [this message]
2002-06-04 10:35 ` Simon Wright
2002-06-04 13:04   ` Martin Dowie
2002-06-06  8:06     ` Simon Wright
2002-06-11  7:18 ` David Thompson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox