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.206.195 with SMTP id fv3mr11233183qab.1.1359972556347; Mon, 04 Feb 2013 02:09:16 -0800 (PST) X-Received: by 10.49.28.162 with SMTP id c2mr1648887qeh.41.1359972556064; Mon, 04 Feb 2013 02:09:16 -0800 (PST) Path: k2ni4456qap.0!nntp.google.com!p13no9329562qai.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 4 Feb 2013 02:09:15 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=130.240.232.139; posting-account=Rr9I-QoAAACS-nOzpA-mGxtAlZ46Nb6I NNTP-Posting-Host: 130.240.232.139 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> <753a3719-e15f-4626-b3cc-ac76f7ef7499@googlegroups.com> <8ee504a6-b371-42ef-a91e-bbb70e3b81d8@googlegroups.com> <2665b0e1-0558-45ac-9a26-7eb7a1ecd689@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Numerical calculations: Why not use fixed point types for everything? From: Ada novice Injection-Date: Mon, 04 Feb 2013 10:09:16 +0000 Content-Type: text/plain; charset=ISO-8859-1 Date: 2013-02-04T02:09:15-08:00 List-Id: On Monday, February 4, 2013 10:37:49 AM UTC+1, Niklas Holsti wrote: > > Number : constant Long_Float := 100.0; When assigning constants, I always use Number : constant := 100.0 and then lets the compiler decides how it wants to treat the constant when say multiplying with a type such as integer, float etc. Is this good practice? > In experimental programs like this, one often forgets to think about > > constant vs variable, or about proper names for variables. But on the > > average, I think it saves time, even when one is experimenting. > Definitely well said. When the focus is on something else, one can get sloppy on other important aspects. Thanks. YC