comp.lang.ada
 help / color / mirror / Atom feed
From: 18k11tm001@sneakemail.com (Russ)
Subject: Re: type declaration and storage requirements
Date: 2 Jun 2002 23:58:47 -0700
Date: 2002-06-03T06:58:48+00:00	[thread overview]
Message-ID: <bebbba07.0206022258.5653ecac@posting.google.com> (raw)
In-Reply-To: hfyK8.40339$wd3.6272305@news6-win.server.ntlworld.com

"martin.m.dowie" <martin.m.dowie@ntlworld.com> wrote in message news:<hfyK8.40339$wd3.6272305@news6-win.server.ntlworld.com>...
> "Russ" <18k11tm001@sneakemail.com> wrote in message
> news:bebbba07.0206021321.a3bbfac@posting.google.com...
> > 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).
> [snip]
> 
> I think the argument here is - "Why do you care?"

Why do I care about how much storage I use? Maybe I'm just obsessive,
but I would like to know if I am using single or double precision. Is
that so unreasonable?

> The only time you care about such things are when you are defining
> interfacing
> and usually there will be an IDD to define such things (or else there isn't
> and,
> yes, you may be the person assigned to think about such size issues - but
> that
> is not a language issue).

I don't care what kind of "issue" you want to label it. I just want to
know whether I am using single or double precision. And what is the
point of specifying the number of digits if the compiler is just going
to choose one or two words? If I choose less than 7 digits, I probably
get single precision, but if I choose 7 (8?) or more I probably get
double precision.

It's like going to a bank where they ask you, "What is the minimum
amount of money you wish to withdraw?" If you ask for $100 or less,
you get $100, but if you ask for more than $100, you get $200. What is
the point of pretending that you get to specify the amount precisely
if you don't? Wouldn't it make more sense to just ask if you want $100
or $200?



  parent reply	other threads:[~2002-06-03  6:58 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 [this message]
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
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