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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ba9a717d172afa4f X-Google-Attributes: gid103376,public From: Martin Dowie Subject: Re: School Assignment--Can this be simplified? Date: 2000/08/31 Message-ID: <39AE0E2A.C11F53F4@baesystems.com>#1/1 X-Deja-AN: 664658049 Content-Transfer-Encoding: 7bit References: <39AD5DBD.972C97CA@brandonsd.mb.ca> Content-Type: text/plain; charset=us-ascii X-Trace: 31 Aug 2000 08:46:32 GMT, stnp2927.stanmre.gecm.com MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-08-31T00:00:00+00:00 List-Id: A little more detail about what compile suite you are using might be helpful... What is 'ada.numerics.aux' - it isn't a standard library unit? Why not use an instance of 'Ada.Numerics.Generic_Elementary_Functions', which is the standard library generic for maths functions? (some implementations provide 'ready-to-use' instances for float/long_float). On the programming style front (feel free to ignore the rest of this response ;-) 1. 'magic numbers' (e.g. 273.15) are repeated and would be more readable as named numbers (e.g. c_to_k_factor : constant := 273.15;) 2. Why are all the data objects 'variables' that are only ever assigned once? This is a little pet-hate of mine, as by declaring them as constants would help reduce target code size on some (most?) compilers. I was always taught it is simply 'better programming'. It is a current loathing of mine simply because we are using a non-optimizing compiler just now; 3 out of the original 5 s/w engineers have left and their stuff is litter with this and, hey, guess what, we're short on space on the target! If they had used constants like this we would have an extra couple of percent - not much, but for a little thought when programming, it is a couple of percent we wouldn't have to be scrapping together now! As a side effect, by reducing code size we increase throughput on the target too :-) 3. I best not even get into the whole 'why is everything a 'float' and not user-defined float types' thing... This smacks of 'C' programs not Ada programs. N J Chackowsky wrote: > [snip] > -- The views expressed here are personal and not those of BAE Systems.