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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4f1dddd3318e056d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-02 23:58:48 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: 18k11tm001@sneakemail.com (Russ) Newsgroups: comp.lang.ada Subject: Re: type declaration and storage requirements Date: 2 Jun 2002 23:58:47 -0700 Organization: http://groups.google.com/ Message-ID: References: NNTP-Posting-Host: 63.194.87.148 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1023087528 22050 127.0.0.1 (3 Jun 2002 06:58:48 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 3 Jun 2002 06:58:48 GMT Xref: archiver1.google.com comp.lang.ada:25241 Date: 2002-06-03T06:58:48+00:00 List-Id: "martin.m.dowie" wrote in message news:... > "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?