To.htm 1.2 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>To</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. See example
  13. </td>
  14. </tr>
  15. </table>
  16. <h1>Description</h1>
  17. <table>
  18. <tr>
  19. <td>
  20. Use the TO command to tell your FOR ... NEXT loop which numbers the variable should be assign to during the loop. If you count down instead of up, you must use a negative STEP value. The values must be integer values. See example.
  21. <br>
  22. <br>
  23. See also: <a class=small href=For.htm>For</a>, <a class=small href=To.htm>To</a>, <a class=small href=Step.htm>Step</a>, <a class=small href=Each.htm>Each</a>, <a class=small href=Next.htm>Next</a>, <a class=small href=Exit.htm>Exit</a>, <a class=small href=While.htm>While</a>, <a class=small href=Repeat.htm>Repeat</a>.
  24. </td>
  25. </tr>
  26. </table>
  27. <h1><a href=../2d_examples/To.bb>Example</a></h1>
  28. <table>
  29. <tr>
  30. <td>
  31. ; Print numbers 10 to 1 <br />
  32. <br />
  33. For t = 10 to 1 Step -1 <br />
  34. Print t <br />
  35. Next
  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=To&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  43. </html>