inputBaseN

Description

Converts string, using the base specified by radix, to an integer.

Categories

Related

Syntax

InputBaseN(string, radix)

Attributes

AttributeDescriptionRequiredDefault
radixBase of the number represented by string, in the range 2—36.
stringA string or a variable that contains one. String that represents a number, in the base specified by radix.

Returns

A number in the range 2-36, as a string.

Example

<h3>InputBaseN Example</h3> 
 
FormatBaseN 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 the base specified by Radix,. 
<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>