FormatBaseN
Description
Converts number to a string, in the base specified by radix.
Returns
String that represents number, in the base radix.
Category
Display and formatting
Function syntax
FormatBaseN(number, radix)
See also
InputBaseN
Parameters
Parameter
number
radix
Example
<h3>FormatBaseN Example</h3>
<p>Converts a number to a string in the base specified by Radix.
<p>
<cfoutput>
<br>FormatBaseN(10,2): #FormatBaseN(10,2)#
<br>FormatBaseN(1024,16): #FormatBaseN(1024,16)#
<br>FormatBaseN(125,10): #FormatBaseN(125,10)#
<br>FormatBaseN(10.75,2): #FormatBaseN(10.75,2)#
</cfoutput>
<h3>InputBaseN Example</h3>
<p>InputBaseN returns the number obtained by converting a string,
using base specified by Radix (an integer from 2 to 36).
<cfoutput>
<br>InputBaseN("1010",2): #InputBaseN("1010",2)#
<br>InputBaseN("3ff",16): #InputBaseN("3ff",16)#
<br>InputBaseN("125",10): #InputBaseN("125",10)#
<br>InputBaseN(1010,2): #InputBaseN(1010,2)#
</cfoutput>
478
Chapter 3: ColdFusion Functions
functions,
Mathematical
Description
Number to convert
Base of the result
functions,
String functions
Need help?
Do you have a question about the COLDFUSION MX 61-CFML and is the answer not in the manual?