Global.htm 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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>Global variable</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. variable = any valid variable/TYPE name
  13. </td>
  14. </tr>
  15. </table>
  16. <h1>Description</h1>
  17. <table>
  18. <tr>
  19. <td>
  20. There are two types of variables in Blitz Basic; local variables and global variables. Global variables can be utilized anywhere in your program (i.e. the main program look and all functions. Use global variables when you need to track a value across your entire program (player score, lives, etc). You can also define TYPEs as global as well.
  21. <br>
  22. <br>
  23. See also: <a class=small href=Local.htm>Local</a>, <a class=small href=Dim.htm>Dim</a>, <a class=small href=Const.htm>Const</a>.
  24. </td>
  25. </tr>
  26. </table>
  27. <h1><a href=../2d_examples/Global.bb>Example</a></h1>
  28. <table>
  29. <tr>
  30. <td>
  31. Global player1score ; Declare player's score as global <br />
  32. Global graph.Cursor ; Declare the Cursor TYPE as global
  33. </td>
  34. </tr>
  35. </table>
  36. <br>
  37. <a target=_top href=../index.htm>Index</a><br>
  38. <br>
  39. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=Global&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  40. </html>