EasyManua.ls Logo

Commodore Plus 4 - Page 25

Commodore Plus 4
464 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...
The
Elements
of
BASIC
13
represents
integers
that
never
go
outside
the
range
-32767
to
32767,
then
it
should
be
defined
as
an
integer
array
(with
the
%
designation).
Use
DEF
FN
to
define
frequently
used
functions.
Use
READ
and
DATA
commands
to
handle
long
lists
of
data
whether
or
not
the
data
items
are
related.
DATA
commands
can
be
placed
together
at
the
end
of
the
program
and
quickly
accessed,
data
item
by
data
item.
Write
subroutines
to
handle
repeated
tasks.
Subroutines
improve
program
organization,
and
they
can
save
memory
by
omitting
needlessly
repeated
commands.
Note:
When
BASIC
searches
for
a
program
line
to
GOTO
or
GOSUB,
it
starts
at
the
beginning
of
the
program
and
looks
sequentially.
To
speed
execution,
place
DATA
commands
at
the
end
of
the
program
so
that
BASIC
does
not
have
to
search
through
them
when
looking
for
a
program
line.
Place
frequently
used
subroutines
near
the
beginning
of
the
program
so
they
are
easy
for
BASIC
to
find.
You
can
save
typing
time
(though
not
execution
time)
by
defining
function
keys
to
print
commands
you
use
repeatedly.
Function
keys
are
easy
to
define,
and
you
will
save
a
lot
of
time
if
you
can
just
press
a
key
instead
of
typing
the
command.
For
example,
if
your
program
will
have
a
lot
of
INPUT
commands,
define
a
function
key
to
print
INPUT.
Defining
a
function
key
to
print
a
command
is
also
useful
when
you
are
experimenting
with
a
graphic-mode
drawing.
Define
a
key
as
one
of
the
graphic
mode commands
(e.g.,
KEY
3,"GRAPHIC
2,1")
so
you
can
quickly
switch
to
the
drawing
mode
you
want
to
use.
The
quickest
way
to
get
out
of
one
of
the
drawing
modes
is
to
commit
a
syntax
error.
Just
type
a
letter
and
press
RETURN.
A
syntax
error
automatically
cancels
the
current
drawing
mode
and
returns
to
text/graphic
mode.
The
drawing
in
the
graphic
mode
is
unaffected
by
the
syntax
error.
To
get
back
to
it,
issue
a
GRAPHIC
command
without
the,
1,
which
clears
the
graphic
mode
screen.
BASIC
Version
3.5
Commands,
Functions,
and System
Variables
The
rest
of
this
chapter
explains
BASIC
commands,
functions,
and
reserved
system
variables
together
in
alphabetical
order.
ABS
Abbr.
aB
ABS
(number)
ABS
is
the
numeric
function
that finds
the
absolute
value of
the
number
enclosed
in
parentheses.
The
absolute
value
of
a
number
is
that
number
without

Other manuals for Commodore Plus 4

Related product manuals