Specifies the unit of measure that a raw numeric expression represents.
expression In unit
- Required numeric expression
- Required name of a unit of measure
The In operator is used when an expression needs a unit of measure, such as when passing an argument to a procedure that requires a unit.
The operator is not needed when the expression already is of a compatible unit, then the conversion is done automatically. Nor is it needed after a simple numeric literal, where just the unit will suffice.
Attempting to convert a value in one unit to an incompatible unit results in a compile-time error.