ArcBasicDocs

Identifiers

Identifiers are the names you choose for variables, constants, arrays, functions, types, fields and labels. A name:

  • starts with a letter or an underscore, _;
  • carries on with any letters, digits and underscores, as long as you like;
  • can't contain spaces or other symbols, and can't be one of the keywords.

So score, player2, _temp and max_speed are fine, but 2player, top score and Next aren't. Capitals are ignored, so PlayerX and playerx name the same thing; it's still worth picking one style and keeping to it, so the program is easy to read.

Type tags

A variable's name can end with a tag saying what kind of value it holds: % for a whole number, # for a decimal number and $ for text, or .TypeName for an object of one of your own types. The tag is needed where the name is first used; after that it can be left off. See Variables.

lives% = 3speed# = 2.5name$ = "Ann"hero.Player = New Player

Labels

A label marks a place in the program, for Goto, Gosub and Restore. It is a name starting with a full stop, on a line of its own:

.levelDataData 3, 5, 8