ZX BASIC:Identifier

From BorielWiki

Jump to: navigation, search

Identifiers are used in your ZX BASIC program to define variable names, function names, subroutine names and labels. ZX Basic identifiers must start with a letter (a..z / A..Z) followed by an arbitrary number of letters and or digits. Sinclair BASIC allows spaces within variable names. ZX BASIC does not (in fact, I found it a bit confusing!)

Some identifiers are reserved words. Most of them are either BASIC sentences or functions. Functions return a value to be used in an expression whilst sentences do not.

Reserved Identifiers

The following identifiers are reserved words, and can't be used as variables, functions or labels. Reserved identifiers are case insensitive (it doesn't matter whether you write them in upper or lower case letters, or a mix of them). So PRINT, print and PrInT means all the same in ZX BASIC. On the other hand, non-reserved words can be either case sensitive or not (depending on the options) in effect.

Identifiers shown in bold are taken from the Sinclair BASIC (beware their meaning here might be different, however). Some of them has been marked as statements, functions or operators:

Personal tools