Units of measurement for Ada library provides an implementation of dimensioned values for Ada. Unit checks are made at run-time, if not optimized out by the compiler. SI and irregular measurement units are supported.
Shifted units like degrees Celsius are supported too. Conversions from and back to strings are provided for all various irregular units.
Here are some key features of "Units of measurement for Ada":
· The type Unit denotes the dimension of a physical entity. The type Measure represents a dimensioned value;
· Mixed unit arithmetic. Values in SI (Le Systeme International d'Unit�s) units can be mixed with irregular units (such as foot and yard) as long as the result is defined;
· Shifted unit support (a widely used instance of a shifted unit is degree of Celsius);
· The type Measure is generic, parameterized by a floating-point type. A non-generic version based on the type Float is also provided;
· String to Measure conversion supports as wide set of irregular units as possible.
· Currently the powers of the base unit components lie in the range -8..7. This limitation has an implementation reason (absence of 64-bit modular integers in many Ada compilers).
What's New in This Release: [ read full changelog ]
· The procedure Put in Measures_UTF8_Edit has the additional parameters Field, Justify, and Fill.
· Fedora and Debian packages are provided for both 32- and 64-bit x86 architectures.