18
CipherLab BASIC Programming Part I
Variables are symbols used to represent data items, such as numerical values or
character strings that are used in a BASIC program. The value of a variable may be
assigned explicitly and can be changed during the execution of a program. Be aware that
the value of a variable is assumed to be undefined until a value is assigned to it.
3.2.1 VARIABLE NAMES AND DECLARATION CHARACTERS
The following are the rules for variable names and declaration characters:
A variable name must begin with a letter (A to Z).
The remaining characters can be letters, numbers, and/or underscores.
The last character can be one of these type declaration characters:
% integer : 2 bytes (- 32,768 to + 32,767)
& long : 4 bytes (- 2,147,483,648 to + 2,147,483,647)
! real number : 4 bytes
$ string : 255 bytes
nothing (default) : 2 bytes (- 32,768 to + 32,767)
The variable name cannot be a BASIC reserved word.
Only 4 types of variables are supported. The maximum number of variables is 1,000.
Variable names are not case-sensitive.