formatBaseN

Description

Converts number to a string, in the base specified by radix.

Categories

Related

Syntax

FormatBaseN(number, radix)

Attributes

AttributeDescriptionRequiredDefault
numberNumber to convert
radixBase of the result

Returns

String that represents number, in the base radix.

Example

<h3>FormatBaseN Example</h3> 
Converts a number to a string in the base specified by Radix. 
 
<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> 
InputBaseN returns the number obtained by converting a string,  
    using base specified by Radix (an integer from 2 to 36).</p> 
 
<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>