ADJN() Function - Adjust Numeric




The ADJN() function returns an 8-byte binary string suitable for string comparisons of numeric values. It may be used in two ways:

Explicitly, by calling the ADJN() function and placing the result into a key.

Implicitly, by using the "B" flag in the key definition (bit $04$ in the key flags) for a key segment holding a numeric quantity. If the "B" flag is used, the field type must be "B" (Business Float). In addition, the length of the field must be 8, which is the length of an ordinary floating point number or string template type "B". If the field length is incorrect, an !ERROR=17 is generated.

See also the SELECT verb.

The ADJN() function is not intended for use as storage for numeric values but for the rank comparison of numeric values in strings such as keys. The format of the ADJN() output was adjusted with the incorporation of 16-digit math in PRO/5 and may be affected by options in OPTS.

See Also

Functions - Alphabetical Listing