Next: A.5 System Interface
Up: A Vienna Base System
Previous: A.3 Regular Expressions
The unit library works on strings to use them as units for numeric values.
A unit string consists of
- A positive or negative real number.
- A sequence of unit items with exponents.
- A fraction sign ``/'' and another sequence of unit items with
exponents.
At least one of the three parts must be present. To multiply unit parts, a
space or a ``*'' can be used and the exponent can be omitted if the value
is one. All basic units and standard prefixes are known. This library allows
to compare, multiply, divide and to calculate the square root of a
unit string. The result is then converted back to a string. Two different
formats are created as output, in the ``SI'' format by m * s * kg * A
* K * cd or in the ``V*A'' format by m * s * V * A * K * cd commonly used
for electrical problems.
IUE WWW server
Fri Jan 3 17:00:13 MET 1997