Caché ObjectScript Reference
$MVFMT


Performs MultiValue formatting of a string or numeric.
Synopsis
Parameters
Description
The
$MVFMT function invokes the Caché MVBasic
FMT function, and returns the resulting value to the ObjectScript environment. Specify parameter values in MVBasic form. For further details refer to the
Caché MultiValue Basic Reference.
Examples
The following example formats 12345 as a fractional number by adding a decimal point and zero padding it with four fractional digits:
WRITE $MVFMT(12345,"R4")
The following example formats 12345 as a fractional number. The decimal point is moved three positions to the left, and the result is rounded to two fractional digits:
WRITE $MVFMT(12345,"R27")
The following example formats 12345 as a date. Note that it uses MultiValue date counting (where 1 = January 1, 1968) rather than Caché
$HOROLOG date counting (where 1 = January 1, 1841):
WRITE $MVFMT(12345,"D")
The following example formats 12345 as a rightjustified string of ten characters, using ^ as a fill character:
WRITE $MVFMT(12345,"10^R")
See Also