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-Thread: a07f3367d7,6a8952cbe009f3ed X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.224.76.198 with SMTP id d6mr5940408qak.8.1359864322832; Sat, 02 Feb 2013 20:05:22 -0800 (PST) X-Received: by 10.49.84.167 with SMTP id a7mr1504245qez.11.1359864322769; Sat, 02 Feb 2013 20:05:22 -0800 (PST) Path: k2ni4456qap.0!nntp.google.com!p13no8216383qai.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 2 Feb 2013 20:05:22 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=69.153.54.159; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 69.153.54.159 References: <4905b963-0036-4129-8050-fb26ef0154d6@googlegroups.com> <32314026-23ae-45b8-a4c5-e589e7d79de2@googlegroups.com> <64e3c342-d042-40a2-8a16-b1f0cdff9f16@googlegroups.com> <91527f7c-0679-4c21-95c7-a07f3fff265d@googlegroups.com> <8cc51443-23f6-4736-a862-d0223998fc2e@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <753a3719-e15f-4626-b3cc-ac76f7ef7499@googlegroups.com> Subject: Re: Numerical calculations: Why not use fixed point types for everything? From: Shark8 Injection-Date: Sun, 03 Feb 2013 04:05:22 +0000 Content-Type: text/plain; charset=ISO-8859-1 Date: 2013-02-02T20:05:22-08:00 List-Id: On Saturday, February 2, 2013 12:55:43 PM UTC-6, Ada novice wrote: > Hi, > > Does the syntax which you gave work? Nope, I was just asking if that's what you had in mind. The question, however, does allow for me to say that the following works: Type P is delta 0.1 digits 3 range 0.0..10.0; declare Index : P := P'First; begin loop Ada.Text_IO.Put_Line( Index'Img ); Exit when Index = P'Last; Index:= P'Succ(Index); End loop; end; And you could use that in, say, your generic bodies to iterate over the fixed-point range.