From: Jacob Sparre Andersen <sparre@crs4.it>
Subject: Macks - adding unit constants?
Date: Thu, 09 Oct 2003 09:57:32 +0200
Date: 2003-10-09T06:42:10+00:00 [thread overview]
Message-ID: <3F8514EC.8050702@crs4.it> (raw)
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."
next reply other threads:[~2003-10-09 7:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-09 7:57 Jacob Sparre Andersen [this message]
2003-10-14 16:01 ` Macks - adding unit constants? Stephen Leake
2003-10-17 20:23 ` Jacob Sparre Andersen
2003-10-20 14:48 ` Preben Randhol
2003-11-03 11:45 ` Jacob Sparre Andersen
2003-11-03 14:24 ` Preben Randhol
2003-10-20 19:06 ` Stephen Leake
2003-11-03 11:45 ` Jacob Sparre Andersen
-- strict thread matches above, loose matches on Subject: below --
2003-10-20 11:08 christoph.grein
2003-11-03 11:57 christoph.grein
2003-11-05 23:38 ` Jacob Sparre Andersen
2003-11-06 9:58 christoph.grein
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox