Kernel 8.0 APIs Banner
Office of Information and Technology (OIT) Banner
[skip navigation]

$$LENGTH^XLFMSMT(): Convert Length Measurement

Reference Type: Supported, Category: Measurement Functions, ICR#: 3175 & 10143

Description

The $$LENGTH^XLFMSMT extrinsic function converts U.S. length to Metric length and vice versa. It returns the equivalent value with units.

Format

  $$LENGTH^XLFMSMT(value,from,to)

Input Parameters

value:

(required) A positive numeric value.

from:

(required) Unit of measure of the value input parameter (see table under the to input parameter).

to:

(required) Unit of measure to which the value input parameter is converted (see table below):

Valid units in either uppercase or lowercase are:

Metric US
km—kilometers mi—miles
m—meters yd—yards
cm—centimeters ft—feet
mm—millimeters in—inches

Output

returns:

Returns the length measurement.

 

Examples

Example 1

Converting U.S. length to Metric length:

>S X=$$LENGTH^XLFMSMT(12,"IN","CM")

>W X
30.48 CM

Example 2

Converting Metric length to U.S. length:

>S X=$$LENGTH^XLFMSMT(30.48,"cm","in")

>W X
12 IN