home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 February / CHIPCD_02_2002.iso / Internet / Macromedia ColdFusion Server 5 / coldfusion-50-win-us.exe / data1.cab / Examples / CFDOCS / snippets / formatbasen.cfm < prev    next >
Encoding:
Text File  |  2001-06-13  |  942 b   |  36 lines

  1. <!--- This example shows FormatBaseN and InputBaseN--->
  2. <HTML>
  3. <HEAD>
  4. <TITLE>
  5. FormatBaseN Example
  6. </TITLE>
  7. </HEAD>
  8.  
  9. <BASEFONT FACE="Arial, Helvetica" SIZE=2>
  10. <BODY  bgcolor="#FFFFD5">
  11. <H3>FormatBaseN Example</H3>
  12.  
  13. <P>FormatBaseN converts a number to a string in the
  14. base specified by Radix.
  15. <P>
  16. <CFOUTPUT>
  17. <BR>FormatBaseN(10,2): #FormatBaseN(10,2)#
  18. <BR>FormatBaseN(1024,16): #FormatBaseN(1024,16)#
  19. <BR>FormatBaseN(125,10): #FormatBaseN(125,10)#
  20. <BR>FormatBaseN(10.75,2): #FormatBaseN(10.75,2)#
  21. </CFOUTPUT>
  22. <H3>InputBaseN Example</H3>
  23. <P>InputBaseN returns the number obtained by converting
  24. a string using the base specified by Radix, an integer ranging
  25. from 2 to 36.
  26.  
  27. <CFOUTPUT>
  28. <BR>InputBaseN("1010",2): #InputBaseN("1010",2)#
  29. <BR>InputBaseN("3ff",16): #InputBaseN("3ff",16)#
  30. <BR>InputBaseN("125",10): #InputBaseN("125",10)#
  31. <BR>InputBaseN(1010,2): #InputBaseN(1010,2)#
  32. </CFOUTPUT>
  33.  
  34. </BODY>
  35. </HTML>       
  36.