home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / ch_code / ch22 / numstr.asp < prev    next >
Encoding:
Text File  |  1998-07-13  |  1.3 KB  |  42 lines

  1. <HTML>
  2. <FONT FACE="Comic Sans MS">
  3. <%
  4. Set STR=Server.CreateObject("NumStrings.StringClass")
  5. %>
  6. <CENTER>
  7. <H1>Number to String Converter</H1>
  8. The following table lists the checks our Accounting Department has processed today. 
  9. <p> 
  10. <TABLE BORDER>
  11. <TR>
  12. <TD WIDTH=250><B><FONT SIZE=+1>Pay to the order of<TD WIDTH=400><B><FONT SIZE=+1>The amount of<TD WIDTH=80>
  13. <TR>
  14. <TD>Computer Books, Inc.
  15. <TD>US$ <% =STR.LowerCaps(STR.Number2String(4325)) %><TD ALIGN=RIGHT> $4,325
  16. <TR>
  17. <TD>The Computer Pit
  18. <TD>US$ <% =STR.LowerCaps(STR.Number2String(255)) %><TD ALIGN=RIGHT> $255
  19. <TR>
  20. <TD>US Distributors
  21. <TD>US$ <% =STR.LowerCaps(STR.Number2String(6004)) %><TD ALIGN=RIGHT> $6,004
  22. <TR>
  23. <TD>Computer Books, Inc.
  24. <TD>US$ <% =STR.LowerCaps(STR.Number2String(1045)) %><TD ALIGN=RIGHT> $1,045
  25. <TR>
  26. <TD>Excelence Editing Services, Inc.
  27. <TD>US$ <% =STR.LowerCaps(STR.Number2String(103)) %> <TD ALIGN=RIGHT> $103
  28. <TR>
  29. <TD>P&P Printing
  30. <TD>US$ <% =STR.LowerCaps(STR.Number2String(5004)) %> <TD ALIGN=RIGHT> $5,004
  31. </TABLE>
  32. <P>
  33. <FONT SIZE=-1>
  34. </CENTER>
  35. The conversion of dollar amounts to strings was done with our new STRINGCLASS server component, developed by our MIS Department in Visual Basic.
  36. <P>
  37. The binary representation of the decimal value 7243 is <% =STR.IntegerToBinary(7243) %>.
  38.  
  39. <% Set STR=Nothing %>
  40.  
  41.  
  42.