LSNumberFormat
761
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:
The positioning can also show where to put a minus sign for negative numbers:
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.
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.
Number
Mask
Result
4.37
$____.__
"$ 4.37"
4.37
_$___.__
" $4.37"
Number
Mask
Result
-4.37
-____.__
"- 4.37"
-4.37
_-___.__
" -4.37"
Character
Meaning
Summary of Contents for COLFUSION MX 7 - INSTALLING AND USING COLDFUSION MX
Page 1: ...COLDFUSION MX7 CFML Reference...
Page 20: ...20 Chapter 1 Reserved Words and Variables...
Page 50: ...50 Chapter 2 ColdFusion Tags cfelse br Searching cfif cfloop cfif...
Page 101: ...cfdefaultcase 101 cfdefaultcase cfswitch cfoutput Your grade is grade cfoutput...
Page 115: ...cfdocumentsection 115 cfdocumentsection cfoutput cfdocument...
Page 411: ...cftable 411 cftable body html...
Page 515: ...Chr 515 maxlength 5 p input type Submit name input type RESET cfform...
Page 605: ...GetEncoding 605 WriteOutput The encoding is theEncoding cfscript cfif...
Page 629: ...GetProfileString 629 tr td input type Submit name Submit value Submit td td td tr table form...
Page 655: ...IIf 655 cfoutput IIf Hour Now GTE 12 DE It is afternoon or evening DE It is morning cfoutput b...
Page 664: ...664 Chapter 3 ColdFusion Functions cfelse h3 Conversion error h3 cfif...
Page 687: ...IsStruct 687 cfoutput cfquery cfif cfoutput hr Employee Add Complete cfoutput cfcase cfswitch...
Page 751: ...LSDateFormat 751 hr noshade cfoutput cfloop...
Page 861: ...StructFind 861 cfquery cfif cfoutput hr Employee Add Complete cfoutput cfcase cfswitch...
Page 903: ...Val 903 value Is the beginning numeric name form...
Page 932: ...932 Chapter 3 ColdFusion Functions...
Page 944: ...944 Chapter 4 ColdFusion MX Flash Form Style Reference...
Page 962: ...962 Chapter 5 Application CFC Reference...
Page 1054: ...1054 Chapter 6 ColdFusion MX Event Gateway Reference...