EasyManua.ls Logo

Commodore VIC-20 - Page 76

Commodore VIC-20
308 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
!
BASIC,
therefore,
BANANA
and
BANDAGE
are the
same name
since
both
begin
with
BA.
The
advantage
of
using
longer
variable
names
is
that
they
make
programs
easier
to
read.
PARTNO,
for
example,
is
more
meaningful
than
PA
as a
variable
name
describing
a
part
number
in
an
inventory
program.
VIC
BASIC
allows
variable
names
to
have up
to
255
characters.
The
following
are
examples
of
names
with
more
than
the
minimum
number
of
characters:
MEMBERS
T1234567
BBBS
ABCDPG%
PARTY
If
you
use
extended
variable
names,
keep
in
mind
the
following:
1.
Oniy
the
first
two
characters,
plus
the
identifier
symbol,
are
significant
in
identifying
a
variable.
Do
not
use
extended
names
like
LOOP1
and
LOOP2;
these
refer
to
the
same
variable:
LO.
2.
VIC
BASIC
has
what
are
called
"reserved
words."
These
are
words
that
have
special
meaning
for
the
VIC
BASIC
interpreter.
No
variable
can
contain
a
reserved
word,
in
longer
names
you
have
to
be
very
careful
that
a
reserved
word does
not
occur
embedded
anywhere
in
the
name.
3.
The
additional
characters
need
extra
memory
space,
which
you
might
need
for
longer
programs.
The
BASIC
interpreter
recognizes
certain
words
as
requests
for
specific
operations.
Names
that
are
used
to
call
up
certain
operations
are
called
"reserved
words."
These
words
cannot
be
used as
variable
names
because
the
interpreter
will
recognize
the
word
as
a
request
for
the
corresponding
operation.
Moreover,
you
cannot
use
a
reserved
word
as
any
part
of
your
variable
name;
BASIC
will
still
find
it
and
treat
it
as a
request
for
an
operation.
ARRAYS
An
array
is
a
sequence
of
related
variables.
A
table
of
numbers,
for
example,
may
be
visualized
as an
array.
The
individual
numbers
within
the
table
become
"elements"
of
the
array.
Arrays
are
a
useful
shorthand
means
of
describing
a
large
number
o!
related
variables.
Consider,
for
example,
a
table
of
numbers
containing
ten
rows
of
numbers,
with
twenty
numbers
in
I

Other manuals for Commodore VIC-20

Related product manuals