Previous Up Next

10.1.1  Notation of unit objects

A unit object has two parts: a real number and a unit expression (a single unit or a multiplicative combination of units). The two parts are linked by the character _ ("underscore"). For example 2_m for 2 meters. For composite units, parenthesis must be used, e.g. 1_(m*s).
If a prefix is put before the unit then the unit is multiplied by a power of 10. For example k or K for kilo (indicate a multiplication by 103), D for deca (indicate a multiplication by 10), d for deci (indicate a multiplication by 10−1) etc...
Input:

10.5_m

Output:

a unit object of value 10.5 meters

Input:

10.5_km

Output:

a unit object of value 10.5 kilometers

Previous Up Next