3 ms·
It does have operator overloading so you could certainly define some function "*"(Left, Right : Distance) return Area and if dedicated enough build up a wh
by Avshalom 6y ago
It does have operator overloading so you could certainly define some
function "*"(Left, Right : Distance) return Area
and if dedicated enough build up a whole set of unit-types with corresponding conversion rules.
Not an Ada guy at all though so no clue if there's a less by-hand way of doing it.
- synack 6y agoThe Units library does exactly what you describe. http://www.dmitry-kazakov.de/ada/units.htm http://www.dmitry-kazakov.de/ada/units.htm