Unit Specification

Unit specification allows you to specify the unit of a given value, which may or may not be a canonical unit.

Usage

Generally, unit specifications are used in expressions when defining a certain quantity. This allows you specify any applicable unit to a value while the underlying calculations remain the same. That is, unit specification cannot be used to convert a value from one unit to another.

A unit specification consists of a unit name enclosed in curly braces. This can be done for numerical values (integer and real) and the result is always a real type value.

10{cm}             100.0     millimeter is canonical unit for distance
(3+4){m}           7000.0    units can be applied to subexpressions
15{in} + 45{mm}    426.0     mixing units in an expression is allowed
30{centimetres}    300.0     you can use unit name in specification

Built-in Units

Both built-in and custom units can be used in unit specification. Some built-in units have suffixes, for example degree° and mircosecond µs, and alternative forms that can be used in expressions. Units marked "Canonical" are canonical units for quantities and used internally by Visual Components Premium 4.8 to store and calculate values.

Note: Internally, 1 unit of Time is 1 second, 1 unit of Distance (Length) is 1 millimeter, and 1 unit of Speed is 1 millimeter per second.

Name Suffix Quantity Note Alternative
centimetres cm Distance None None
centimetres cm/s Velocity None None
cubic centimetres cm3 Volume None cm^3
cubic decimetres dm3 Volume None dm^3
cubic feet cu ft Volume None None
cubic inches cu in Volume None None
cubic metres m3 Volume None m^3
cubic yards cu yd Volume None None
cups cp Volume.Liquid None None
days days Time None None
degrees ° Angle Canonical deg
degrees Celsius °C Temperature None degC
degreesFahrenheit °F Temperature None degF
degrees per second °/s Angular velocity Canonical deg/s
degrees per second squared °/s2 Angular acceleration Canonical deg/s^2
drams dr Mass None None
feet ft Distance None None
feet per second squared ft/s2 Acceleration None ft/s^2
fluid drams fl dr Volume.Liquid None None
fluid ounces fl oz Volume.Liquid None None
foot pounds force ftlbf Torque None None
gallons gal Volume.Liquid None None
grads grad Angle None None
grads per second grad/s Angular velocity None None
grads per second squared grad/s2 Angular acceleration None grad/s^2
gram degrees per second g°/s Angular momentum None gdeg/s
gram grads per second ggrad/s Angular momentum None None
gram metres per second gm/s Momentum None None
gram radians per second g rad/s Angular momentum None None
grams g Mass Canonical None
hours hr Time None None
hundredweights cwt Mass None None
inch pounds force inlbf Torque None None
inches in Distance None None
inches per second squared in/s2 Acceleration None in/s^2
Kelvin K Temperature Canonical None
kilogram degrees per second kg°/s Angular momentum Canonical kgdeg/s
kilogram grads per second kggrad/s Angular momentum None None
kilogram metres per second kgm/s Momentum Canonical None
kilogram radians per second kg rad/s Angular momentum None None
kilograms kg Mass None None
kilonewtons kN Force None None
litres l Volume.Liquid None None
metres m Distance None None
metres per second m/s Velocity None None
metres per second squared m/s2 Acceleration None m/s^2
microseconds µs Time None mus
millilitres ml Volume.Liquid None None
millimetres mm Distance Canonical None
millimetres per second mm/s Speed, Velocity Canonical None
millimetres per second squared mm/s2 Acceleration Canonical mm/s^2
milliseconds ms Time None None
minutes min Time None None
newton centimetres Ncm Torque None None
newton metres Nmm Torque None None
newton millimetres Nmm Torque Canonical None
newtons N Force Canonical None
ounces oz Mass None None
pints pt Volume.Liquid None None
pound degrees per second lb°/s Angular momentum None lbdeg/s
pounds lb Mass None None
pounds force lbf Force None None
quarts qt Volume.Liquid None None
radians rad Angle None None
radians per second rad/s Angular velocity None None
radians per second squared rad/s2 Angular acceleration None rad/s^2
seconds s Time Canonical None
short tons t Mass None None
square centimetres cm2 Area none cm^2
square feet sqft Area None None
square inches sqin Area None None
square metres m2 Area None m^2
square millimetres mm2 Area None mm^2
tonnes t Mass None None
weeks wks Time None None