Lsparsenumber - MACROMEDIA COLDFUSION 4.5-CFML LANGUAGE Reference

Cfml language reference
Table of Contents

Advertisement

460

LSParseNumber

Converts a locale-specific string to a number. Returns the number matching the value
of string.
Syntax
LSParseNumber( string )
string
String being converted to a number.
Examples
<!--- This shows LSParseNumber --->
<HTML>
<HEAD>
<TITLE>LSParseNumber Example</TITLE>
</HEAD>
<BODY>
<H3>LSParseNumber Example</H3>
<P>LSParseNumber converts a locale-specific string to a
number.
<!--- 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>
Returns the number matching the value of string.
--->
#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>
The actual number: #LSParseNumber
(LSNumberFormat(1234.5678, "_________"))#<BR>
<Hr noshade>
CFML Language Reference

Advertisement

Table of Contents
loading
Need help?

Need help?

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

This manual is also suitable for:

Coldfusion 4.5

Table of Contents