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 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 19:26:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed-east.nntpserver.com!nntpserver.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!59ce1190!not-for-mail Message-ID: <3CFAD3B1.E6E0E290@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: type declaration and storage requirements References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 03 Jun 2002 02:26:00 GMT NNTP-Posting-Host: 63.184.2.58 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1023071160 63.184.2.58 (Sun, 02 Jun 2002 19:26:00 PDT) NNTP-Posting-Date: Sun, 02 Jun 2002 19:26:00 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:25233 Date: 2002-06-03T02:26:00+00:00 List-Id: 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