Macromedia coldfusion 4.5-cfml language reference Benutzerhandbuch

Seite von 608
452
CFML Language Reference 
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>
#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>
</CFOUTPUT>
</CFLOOP>
</BODY>
</HTML>
3.21
C(__^)__
"( 3.21) "
3.21
C__(^)__
" (3.21) "
12345678
 12345678
Number
Mask
Result