Each.htm 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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>Each type_variable</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. type_variable = A previously declared TYPE object
  13. </td>
  14. </tr>
  15. </table>
  16. <h1>Description</h1>
  17. <table>
  18. <tr>
  19. <td>
  20. If you haven't read up on the TYPE command, you might want to do so before continuing. <br />
  21. <br />
  22. The For .. Each loop allows you to walk through each object in the Type collection. This is perfect for updating a large group of objects (such as a group of alien invaders). Do look over the Type command.
  23. <br>
  24. <br>
  25. See also: <a class=small href=Type.htm>Type</a>, <a class=small href=New.htm>New</a>, <a class=small href=Before.htm>Before</a>, <a class=small href=After.htm>After</a>, <a class=small href=First.htm>First</a>, <a class=small href=Last.htm>Last</a>, <a class=small href=Insert.htm>Insert</a>, <a class=small href=Delete.htm>Delete</a>.
  26. </td>
  27. </tr>
  28. </table>
  29. <h1><a href=../2d_examples/Each.bb>Example</a></h1>
  30. <table>
  31. <tr>
  32. <td>
  33. ; Move them all over 1 (like the description example from TYPE command) <br />
  34. <br />
  35. For room.chair = Each chair <br />
  36. room\x = room\x + 1 <br />
  37. Next
  38. </td>
  39. </tr>
  40. </table>
  41. <br>
  42. <a target=_top href=../index.htm>Index</a><br>
  43. <br>
  44. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=Each&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  45. </html>