Caché SQL Reference
[Home] [Back] [Next]
InterSystems: The power behind what matters   

A MultiValue formatting function for dynamic array elements.
dynarray A MultiValue dynamic array to be formatted for display.
format A quoted string consisting of positional letter and number codes specifying the display format for the elements of dynarray.
The $MVFMTS function returns the dynarray value with each element formatted as specified by format. This formatting may include justification, character filling, and the rounding or zero padding of numeric element values. The most common use for $MVFMTS is to provide a uniform display format for fractional numbers.
The format string has the following format:
w Optional — The overall width of the display field, specified as a positive integer. Used to impose a uniform width (number of characters) for each element of dynarray. Different operations are performed if w is larger or smaller than the length of an element, as described in the $MVFMT function.
f Optional — A fill character, specified as a single character. If the fill character is a number, the backslash (\), or the letters “L”, “R”, or “T” it must be enclosed in string delimiter quotes. You must specify w to use f. If you specify w, but do not specify f, it defaults to the space character.
R Optional — The letter “R” or “L” specifying right or left justification. This letter code is not case-sensitive. If you do not specify a letter code, $MVFMTS defaults to left justification.
n Optional — The number of fractional digits to the right of the decimal place, specified as a positive integer. If you specify n, it must either be the only code in format, or it must be preceded by the letter “R” or “L”. If you do not specify n, $MVFMTS defaults to number of fractional digits in string.
There are two basic uses of format:
For further details on format codes, refer to the $MVFMT function.
See Also

Send us comments on this page
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA