Global variable

Parameters

variable = any valid variable/TYPE name

Description

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.

See also: Local, Dim, Const.

Example

Global player1score ; Declare player's score as global
Global graph.Cursor ; Declare the Cursor TYPE as global

Index

Click here to view the latest version of this page online