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-11-06 01:19:42 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!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: Thu, 06 Nov 2003 00:38:49 +0100 Organization: CRS4, Center for Adv. Studies, Research and Development in Sardinia Message-ID: <3FA98A09.5040009@crs4.it> References: 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 1068109155 21578 156.148.70.170 (6 Nov 2003 08:59:15 GMT) X-Complaints-To: news@nntpserver.crs4.it. NNTP-Posting-Date: 6 Nov 2003 08:59:15 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:2127 Date: 2003-11-06T08:59:15+00:00 List-Id: Christoph Grein wrote: > Why not: > > Dist: constant Meter := +0.000_86; Because that converts a dimensionless number to a dimensioned number, and you can't do that (in physics). > Or use Dmitry Kazakov's or my method: > > Dist: constant SI := 0.000_86 * Meter; > or > Dist: constant SI := 0.86 * Milli * Meter; This is in some ways more to my taste. Here there are no conversions of dimensionless numbers to dimensioned numbers. But I prefer the compile-time checking I get with Macks to the run-time checking implied in the above examples. Jacob -- "[...] *transfer* a bit of salary from the person who writes a bug to the person that finds a bug..." -- Keith Ray