At APL2007, from which I just returned, Guy Steele spoke about a language called "Fortress", on which they're working at Sun, that allows numbers to be specified with units attached to them. Of course this doesn't help you in J - and probably not for some time even in that language as it's still under development with a long time horizon.
I once toyed with the notion of implementing dimensioned numbers by working with each number as a pair where the second number would be a prime arbitrarily associated with a unit of measure. This would allow you to factor the second number - possibly as a rational - to figure out the base units in a calculation resulting in some compound unit such as kg-m/(seconds^2). However, addition would become more complicated as you would have to dis-allow adding numbers with mismatched units and it's not clear how you could simply do this in J. Please keep us informed if you come up with a way to do this for your purposes. >Frank Hamilton <[EMAIL PROTECTED]> to programming >Has anyone considered an application to calculate with systems of >units, such as SI? I understand that it would be difficult to include >in the primitives, but as an application it would be extremely useful >a lot of the time. It would attract a lot of users. MathCad is a good... -- Devon McCormick, CFA ^me^ at acm. org is my preferred e-mail ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
