FormatBaseN
Last updated
Was this helpful?
Was this helpful?
formatBaseN( 1024, 16 );
formatBaseN( 125, 10 );
formatBaseN( 10.75, 2 );
<bx:output>
#formatBaseN( 15, 2 )# <!--- 1111 (binary) --->
#formatBaseN( 15, 16 )# <!--- f (hexadecimal) --->
#formatBaseN( 15, 8 )# <!--- 17 (octal) --->
</bx:output><bx:set max = CreateObject( "java", "java.lang.Integer" ).MAX_VALUE >
<bx:output>
#formatBaseN( max, 16 )# <!--- 7fffffff (correct) --->
#formatBaseN( max + 1, 16 )# <!--- 7fffffff (incorrect) --->
</bx:output>