MACROMEDIA COLDFUSION 5 - CFML Reference page 546

Cfml reference
Hide thumbs Also See for COLDFUSION 5 - CFML:
Table of Contents

Advertisement

528
Number
3.21
Example
<!--- 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 locales and
show number values --->
<CFLOOP LIST = "#Server.Coldfusion.SupportedLocales#"
INDEX = "locale" DELIMITERS = ",">
</CFLOOP>
</body>
</html>
Mask
C__(^)__
12345678
<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>
Chapter 3 ColdFusion Functions
Result
" (3.21) "
12345678

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 5 - CFML and is the answer not in the manual?

This manual is also suitable for:

Coldfusion 5

Table of Contents