MACROMEDIA COLFUSION MX 7-CFML Reference page 761

Cfml reference
Hide thumbs Also See for COLFUSION MX 7-CFML:
Table of Contents

Advertisement

Character
Meaning
0
Located to the left or right of a mandatory decimal point. Pads with zeros.
( )
If number is less than zero, puts parentheses around the mask.
+
Puts plus sign before positive number; minus sign before negative number.
-
Puts space before positive number; minus sign before negative number.
,
Separates every third decimal place with a comma (or locale-appropriate symbol).
L,C
Left-justifies or center-justifies number within width of mask column. First
character of mask must be L or C. The default value is right-justified.
$
Puts a dollar sign (or locale-appropriate symbol) before formatted number. First
character of mask must be the dollar sign ($).
^
Separates left and right formatting.
Note: If you do not specify a sign for the mask, positive and negative numbers do not align in
columns. To put a plus sign or space before positive numbers and a minus sign before negative
numbers, use the plus or hyphen mask character, respectively.
Usage
This function uses Java standard locale formatting rules on all platforms.
The position of symbols in format masks determines where the codes take effect. For example, if
you put a dollar sign at the far left of a format mask, ColdFusion displays a dollar sign at the left
edge of the formatted number. If you separate the dollar sign on the left edge of the format mask
by at least one underscore, ColdFusion displays the dollar sign just to the left of the digits in the
formatted number.
These examples show how symbols determine formats:
Number
Mask
4.37
$____.__
4.37
_$___.__
The positioning can also show where to put a minus sign for negative numbers:
Number
Mask
-4.37
-____.__
-4.37
_-___.__
The positions for a symbol are: far left, near left, near right, and far right. The left and right
positions are determined by the side of the decimal point on which the code character is shown.
For formats that do not have a fixed number of decimal places, you can use a caret (^) to separate
the left fields from the right.
Result
"$ 4.37"
" $4.37"
Result
"- 4.37"
" -4.37"
LSNumberFormat
761

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents