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 01:02:54 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!feed.news.nacamar.de!newsmi-eu.news.garr.it!NewsITBone-GARR!newsserver.cilea.it!news.crs4.it!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Macks - adding unit constants? Date: Fri, 17 Oct 2003 22:23:50 +0200 Organization: CRS4, Center for Adv. Studies, Research and Development in Sardinia Message-ID: <3F904FD6.7040301@crs4.it> References: <3F8514EC.8050702@crs4.it> NNTP-Posting-Host: sparre.crs4.it Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: pietro.crs4.it 1066632440 26140 156.148.70.170 (20 Oct 2003 06:47:20 GMT) X-Complaints-To: news@nntpserver.crs4.it. NNTP-Posting-Date: 20 Oct 2003 06:47:20 GMT User-Agent: Any Browser, HTML 4.01, XHTML 1.0 X-Accept-Language: fo, da, no, sv, is, fr, de, it, In-Reply-To: Xref: archiver1.google.com comp.lang.ada:1187 Date: 2003-10-20T06:47:20+00:00 List-Id: 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. 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. Later I will hopefully get time to make a modified version of Macks that suits my views of how to handle units in Ada. > Anything else leads to > confusion. It depends on how you do it. Jacob (who views Ada code as a very important user interface) -- "If you think Tuck has said something that is completely wrong, you are almost certainly missing something :-)"