Variables
1• Variable name
Variables are the changeable values in a program and
are referred to by specifying their names,
variable names are written with an alphanumeric string
of optional length beginning with an alphabetical
character,
variable.
The
The first sixteen characters identify the
Example
>10 TR = 10
>20 TRE = 20
>30 TRANSPOSITION = 30
>40 PRINT TR, TRE, TRANSPOSITION
>RUN
30
20
10
The variable names must not be spelled the same as
keywords, but may include their spelling.
Any variable
name beginning with FN or USR is erroneous.
Example
(Erroneous, AND is an operator)
>10 AND = 100
>20 BAND = 0
(Acceptable)
>30 AFN10 = A + B
(Acceptable)
>40 FNABC = 1
(Erroneous, FN is an operator)
(Acceptable)
>50 BAFN = 1
2. Types of variables
The variables are classified into strings or numerics
(integers, simple-precision real numbers, and double
precision real numbers).
3-16