452
Number
3.21
3.21
Examples
<!--- This shows LSNumberFormat --->
<HTML>
<HEAD>
<TITLE>LSNumberFormat Example</TITLE>
</HEAD>
<BODY>
<H3>LSNumberFormat Example</H3>
<P>LSNumberFormat returns a number value using
the locale convention.
<!--- loop through a list of possible locales and
show number values
<CFLOOP LIST="#Server.Coldfusion.SupportedLocales#"
INDEX="locale" DELIMITERS=",">
<CFSET oldlocale = SetLocale(locale)>
<CFOUTPUT><P><B><I>#locale#</I></B><BR>
</CFOUTPUT>
</CFLOOP>
</BODY>
</HTML>
Mask
C(__^)__
C__(^)__
12345678
--->
#LSNumberFormat(-1234.5678, "_________")#<BR>
#LSNumberFormat(-1234.5678, "_________.___")#<BR>
#LSNumberFormat(1234.5678, "_________")#<BR>
#LSNumberFormat(1234.5678, "_________.___")#<BR>
#LSNumberFormat(1234.5678, "$_(_________.___)")#<BR>
#LSNumberFormat(-1234.5678, "$_(_________.___)")#<BR>
#LSNumberFormat(1234.5678, "+_________.___")#<BR>
#LSNumberFormat(1234.5678, "-_________.___")#<BR>
<Hr noshade>
Result
"( 3.21) "
" (3.21) "
12345678
CFML Language Reference
Need help?
Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?
Questions and answers