41 lines
1.2 KiB
HTML
41 lines
1.2 KiB
HTML
<html>
|
|
<head>
|
|
<title>Blitz3D Docs</title>
|
|
<link rel=stylesheet href=../css/commands.css type=text/css>
|
|
</head>
|
|
<body>
|
|
<h1>Global variable</h1>
|
|
<h1>Parameters</h1>
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
variable = any valid variable/TYPE name
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h1>Description</h1>
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
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.
|
|
<br>
|
|
<br>
|
|
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>.
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h1><a href=../2d_examples/Global.bb>Example</a></h1>
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
Global player1score ; Declare player's score as global
|
|
<br />
|
|
Global graph.Cursor ; Declare the Cursor TYPE as global
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
<a target=_top href=../index.htm>Index</a><br>
|
|
<br>
|
|
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>
|
|
</html>
|