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,730a7c3edfcae91f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-20 11:07:33 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Macks - adding unit constants? Date: 20 Oct 2003 15:06:00 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <3F8514EC.8050702@crs4.it> <3F904FD6.7040301@crs4.it> NNTP-Posting-Host: shevek.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1066673395 13047 128.183.235.101 (20 Oct 2003 18:09:55 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 20 Oct 2003 18:09:55 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Xref: archiver1.google.com comp.lang.ada:1221 Date: 2003-10-20T18:09:55+00:00 List-Id: Jacob Sparre Andersen writes: > Stephen Leake wrote: > > > Exception for user interfaces, you should only use one length unit in > > your code; > > When it comes to my current problem I agree, but I am not sure I do it > in general. > > > it might as well be meter (m). > > It is very impractical to have to remember to write "0.000_86" and not > "0.86", when you put constants in your code. That's a user interface. > I prefer to have to write "0.000_86 * m" (or "0.86 * mm") so there > is an explicit conversion from nondimensional to dimensional units. > Since this preference is rather strong, I have decided to use a > hand-written units package for this project. How often do you actually have hardcoded constants in real code? I'd expect them to be in an input file somewhere. -- -- Stephe