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-04 06:01:15 PST From: "Martin Dowie" Newsgroups: comp.lang.ada References: Subject: Re: type declaration and storage requirements Date: Tue, 4 Jun 2002 14:04:16 +0100 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: sg2c11210.sd.edinbr.gmav.gecm.com Message-ID: <3cfcb9df$1@pull.gecm.com> X-Trace: pull.gecm.com 1023195615 sg2c11210.sd.edinbr.gmav.gecm.com (4 Jun 2002 14:00:15 +0100) Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!btnet-peer!btnet-peer0!btnet-feed5!btnet!newreader.ukcore.bt.net!pull.gecm.com!not-for-mail Xref: archiver1.google.com comp.lang.ada:25301 Date: 2002-06-04T14:04:16+01:00 List-Id: "Simon Wright" wrote in message news:x7vptz79vr7.fsf@pushface.org... > If your requirement is to specify a size for the values, say > > type My_Short_Float_Type is new Float; > type My_Long_Float_Type is new Long_Float; > > or > > subtype My_Short_Float_Type is Float; > subtype My_Long_Float_Type is Long_Float; > > which are pretty likely to map to C float and double. or use Interfaces.C.C_Float and Interfaces.C.Double to be sure to match C, or Interfaces.Integer_16, Interfaces.Integer_32 to avoid even mentioning C ;-) > If on the other hand your requirement is to specify the precision your > algorithm requires, you really do need > > type My_Float_Type is digits 7; > > and if it turns out that that needs 8 bytes (ie double), so be it. Amen!