Unit Statement

Defines a unit of measure.

Syntax

Unit [ ( parameter In unit ) ] [ %SI ] name(s) [ = expression ]

Parts

parameter
Optional. A numeric variable that can be used in the expression, acting as a placeholder when defining units with offset scales, such as temperature.
unit
A related unit to the one being defined
%SI
Optional indication of an SI unit.
name(s)
Required. One or more names separated by spaces. All names are synonymous. Plural forms can be created by using parentheses.
expression
Optional. A conversion factor.

Details

Describe

Examples

Unit %SI meter(s) metre(s) m
Unit light_year(s) ly = 9.4605284 petameters
Unit Kelvin K
Unit (k In Kelvin) degree_C degrees_C = k + 273.15

See also