Next.htm 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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>Next</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. None
  13. </td>
  14. </tr>
  15. </table>
  16. <h1>Description</h1>
  17. <table>
  18. <tr>
  19. <td>
  20. This command closes the FOR ... NEXT loop, causing program execution to start again at the FOR command unless the loop condition has been met (the last value has been met). Check the example for more info. Note: Do NOT use the FOR command's variable as a parameter (i.e. NEXT T) as you would in most BASIC languages. Blitz will automatically match it with the nearest FOR command.
  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=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/Next.bb>Example</a></h1>
  28. <table>
  29. <tr>
  30. <td>
  31. ; Print the values 1 through 10 <br />
  32. For t = 1 To 10 <br />
  33. Print t <br />
  34. Next <br />
  35. ; Print the values 1,3,5,7,9 <br />
  36. For t = 1 To 10 Step 2 <br />
  37. Print t <br />
  38. Next
  39. </td>
  40. </tr>
  41. </table>
  42. <br>
  43. <a target=_top href=../index.htm>Index</a><br>
  44. <br>
  45. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=Next&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  46. </html>