Str.htm 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <html>
  2. <head>
  3. <title>Blitz3D Docs</title>
  4. <link rel=stylesheet href=../css/commands.css type=text/css>
  5. </head>
  6. <body>
  7. <h1>Str variable/value</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. variable/value = numeric value or variable
  13. </td>
  14. </tr>
  15. </table>
  16. <h1>Description</h1>
  17. <table>
  18. <tr>
  19. <td>
  20. Use this command to transform an numeric value to a string value for use with string commands. Blitz prints numeric values just fine, but should you want to do functions like LEFT$, you'll need to convert your numeric variable to a string variable. Note: during the conversion, all 6 decimal places will be represented on floating point number conversions. <br />
  21. <br />
  22. If you wish to convert from a string to a number, there is no equivalent Val command. Instead, simply assign the string variable into a numeric variable, and Blitz will implicitly convert it.
  23. </td>
  24. </tr>
  25. </table>
  26. <h1><a href=../2d_examples/Str.bb>Example</a></h1>
  27. <table>
  28. <tr>
  29. <td>
  30. ; STR example <br />
  31. <br />
  32. num#=2.5 <br />
  33. mynum$=str num# <br />
  34. <br />
  35. Print mynum$
  36. </td>
  37. </tr>
  38. </table>
  39. <br>
  40. <a target=_top href=../index.htm>Index</a><br>
  41. <br>
  42. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=Str&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  43. </html>