FIXED Function

Purpose

Converts an arithmetic or string value to a fixed-point arithmetic value with a specified precision and, optionally, a scale factor.

Syntax

FIXED(x,p)

or

FIXED(x,p,q)

Parameters

x is an arithmetic or string value, and p and q are integer constants representing precision and scale factor, respectively.

Description

The FIXED function converts an arithmetic or string value x to a fixed-point arithmetic value with a specified precision p and, optionally, a scale factor q. If q is omitted, q equals zero. The resulting fixed-point arithmetic value is converted according to the rules for type conversion given in the chapter Data Type Conversions.

Examples

FIXED(9.8614E+01,15,2)   /* returns 98.61 */

Restrictions

None.