QBasic 1.1: SHARED Statement

Syntax

SHARED variable[()] [AS type] [,variable[()] [AS type]]...
STATIC variable[()] [AS type] [,variable[()] [AS type]]...

Description / Parameter(s)

variable The name of the module-level variable to share or variable to make static. Variable names can consist of up to 40 characters and must begin with a letter. Valid characters are A-Z, 0-9, and period (.).
AS type Declares the data type of the variable (INTEGER, LONG, SINGLE, DOUBLE, STRING, or a user-defined type).

Example

' The program REMLINE.BAS illustrates using the SHARED and STATIC ' statements. To view or run this program, load REMLINE.BAS using the Open ' command from the File menu.