What is a unit of measure?

The term unit of measure is used to refer to a number and the units of that number. For example, 2.4 kilogrammes, £3.20, 20 minutes. These units of measure are used for general units, time durations and currencies.

Whenever you supply a value for something, you must also supply the units of that value. This is necessary so that the system knows when it needs to convert between units to do arithmetic.

Whenever the system needs to do some arithmetic on two measures, it examines their units. If they are both the same, it just does the arithmetic, e.g. 2kg plus 2kg is 4kg. If they are different, first one is converted to the other, then the arithmetic is done, e.g. 2kg plus 200g is the same as 2kg plus 0.2kg which is 2.2kg.

The philosophy is to provide facilities to allow you to express numbers in whatever units are 'natural' to the circumstances. Provided you define appropriate conversion expressions, the system will convert to and from your units as necessary, automatically. This means that once appropriate units and their conversions are set-up, you can forget it. However, the initial set-up requires a little thought.