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

$$BASE^XLFUTL(): Convert Between Two Bases

Reference Type: Supported, Category: Utility Functions, ICR#: 2622

Description

The $$BASE^XLFUTL extrinsic function converts a number from one base to another. The base must be between 2 and 16, both from and to parameters.

Format

  $$BASE^XLFUTL(n,from,to)

Input Parameters

n:

(required) Number to convert.

from:

(required) Base of number being converted.

to:

(required) Base to which the number is to be converted.

Output

returns:

Returns the converted number from one base to another.

Example 1

>S X=$$BASE^XLFUTL(1111,2,16)

>W X
F

Example 2

>S X=$$BASE^XLFUTL(15,10,16)

>W X
F

Example 3

>S X=$$BASE^XLFUTL("FF",16,10)

>W X
255