EasyManuals Logo
Home>Texas Instruments>Desktop>TI-99/4A

Texas Instruments TI-99/4A User Reference Guide

Texas Instruments TI-99/4A
204 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #31 background imageLoading...
Page #31 background image
Variables
In BASIC all variables
are
given a name.
Each
variable name may
be
one
or more
characters
in length but must begin with a letter.
an
at-sign (@), a left-bracket
([),
a right-bracket
(]),
a
back
slash (\),
or a line (_).
The
only
characters
allowed in a variable name
are
letters.,
numbers.,
the
at-s.ign
((tl)) ,
and
the
line
(_
)
Onp
exreption
is the dollar-sign ($).
The
last
character
in a
string
variable name
must
be a dollar-sign ($)
and
this is the only place in a variable
name
that
it
may
be
used.
Variable
names
are
restricted
to fifteen
characters
including the dollar-sign
for
string
variable names,
Array
names follow the
same
rules
as
simple variable names, (See
the section
on
Arrays for more information.) In a single
program, the
same
name cannot be used both as a simple variable
and
as
an
array
name. nor
can
two arrays with different dimensions
have the
same
name.
For
example, Z and Z(3)
cannot
both be used
as
names
in the
same
program, nor
can
X(3,4)
and
X(2,l,3).
However. there is no relationship between a numeric variable name
and
a string variable name which agree except for the dollar sign
(X
and
X$ may both be used in the
same
program).
NUlJIe:n'r.;
Variable:
Names
Valid:
X.
A9,
ALPHA.
BASE_PAY.
V(3), T(X,3),
TABLE
(X,XX7Y
/2)
Invalid: X$,
XIB,
3Y
String Variable Names
Valid:
S$,
YZ2$.
NAME$,
Q5$(3, X)
Invalid:
S$3,
X9,
4Z$
If
you
enter
a
variable
name
with
more
than
fifteen
characters,
the
message "BAD
NAME"
is displayed
and
the line is not entered into
memory. Reserved words
are
not allowed as variable names, but
lliay
ue
useu
as
lJal t
uf
a
val
iaule
llallle.
FUI eXdllllJle,
LIST
is
not allowed
as
a variable name but
LIST$
is accepted.
At
any
instant
while>
a progt"::Im
is.
nmning,
every
variable
has
a
single value. When a program begins running, the value associated
with
each
numeric variable is
set
to zero
and
the value associated
with
each
string
variable
is
set
to
null
(a
string
with
a
length
of
zero
characters), When a program
is
running, values
are
assigned to
variables when
LET
statements,
READ
statements.
FOR-TO·
STEP
statements,
or
INPUT
statements
are
performed.
The
length of the
character
strin~
value associated with a string
variable may vary from a length of zero to a limit of 255
characters
while
a
program
is
running_
User's
Reference
Guide
Examples:
>110
ABCDCrGHIJKLMNDPQ=3
* BAD NAIIIE
11·11

Other manuals for Texas Instruments TI-99/4A

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-99/4A and is the answer not in the manual?

Texas Instruments TI-99/4A Specifications

General IconGeneral
BrandTexas Instruments
ModelTI-99/4A
CategoryDesktop
LanguageEnglish

Related product manuals