Op 5-9-2021 om 9:27 schreef Dmitry A. Kazakov:
I agree with Dimitry but I think the problem is far bigger and not only
in Ada but in every computer language. You cannot use packages written
by others if you do not know the dimensions they use. For instance in
mechanical engineering in Europe there is a general use of cm while in
other countries they use inches and in aircraft engineering they use in
Europe mostly mm.
In general the use of dimensioning system ( f.i. cgs -cm gram second) is
different for different countries and application area's. Some factors
used within calculations are even dependant in the dimensioning system.
It would be a good idea if a package was developed that can solve all
these problems for instance by doing the calculations in one of the
possible dimensioning systems automagically presenting the results in
the dimension you choose.
Such a system must exist of a record for every value, that exist of at
least real values for the standard dimensioning system and the value in
the dimensioning system you want, the factor between the two systems and
the string containing the dimension, perhaps even more.
There should be functions for "+", "-", "*", "/" and sqrt. The
calculation should be done for the value in the standard dimension while
the input and output must be in the wanted system. Also the strings and
factors must be changed when necessary.
I have already been thinking how but the problem are mostly in the
strings and the fact that there are also dimensions that have a lower
limit (temperature) or have an offset (degrees Celcius, Reamur or
Fahrenheit) or exist of several integer values (time).
I think that the potential of Ada of being independent of an operating
system can be extended that way to independent of the dimensioning system.