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,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-11 20:30:37 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsmi-us.news.garr.it!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: Macks - adding unit constants? Date: Thu, 09 Oct 2003 09:57:32 +0200 Organization: CRS4, Center for Adv. Studies, Research and Development in Sardinia Message-ID: <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 1065681730 11542 156.148.70.170 (9 Oct 2003 06:42:10 GMT) X-Complaints-To: news@nntpserver.crs4.it. NNTP-Posting-Date: 9 Oct 2003 06:42:10 GMT User-Agent: Any Browser, HTML 4.01, XHTML 1.0 X-Accept-Language: fo, da, no, sv, is, fr, de, it, Xref: archiver1.google.com comp.lang.ada:700 Date: 2003-10-09T06:42:10+00:00 List-Id: I have just started to use Macks to generate packages for handling physical units. I like the tool, but I would appreciate some method for handling different proportional units like km, m and mm _in_ Macks. I also find writing: Diameter := 3.0 * mm; Diameter := 0.003 * m; more appealing than: Diameter := 0.003; Diameter := Meter (0.003); I considered if changing the declaration of fundamental units from: Meter is fundamental; to: Meter is fundamental Length; naming the type "Length" and not "Meter", but declaring a constant "Meter" of type "Length". Since "Unit * Integer" is reserved for declaring vectors, we need some other syntax for declaring derived units. Could: mm := 0.001 * Meter; be used? Or should I just put the derived units in a separate package? Jacob -- "There is nothing worse than having only one drunk head."