EasyManua.ls Logo

Commodore 128D - Page 264

Commodore 128D
427 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...
DELETE
DIM
EXAMPLE:
10
DEF
FNA(X)
=
12*(34.75-X/.3)
+
X
20
PRINT
FNA(7)
The
number
7
is
inserted
each
place
X
is
located
in
the
formula
given
in
the
DEF
statement.
In
the
example
above,
the
answer
returned
is
144.
(Function
definitions
are
lost
if
BASIC
is
moved—e.g.,
from
$1C00
to
$4000
when
a
GRAPHIC
call
occurs.
Invoke
a
graphic
mode
before
defining
functions.)
—Delete
lines
of
a
BASIC
program
in
the
specified
range
DELETE
[first
line]
[-last
line]
This
command
can
be
executed
only
in
direct
mode.
EXAMPLES:
Deletes
line
75.
Deletes
lines
10
through
50,
inclusive.
DELETE
75
DELETE
10-50
DELETE-50
DELETE
75-
Deletes
all
lines
from
the
beginning
of
the
program
up
to
and
including
line
50.
Deletes
all
lines
from
75
to
the
end
of
the
program,
inclusive.
—Declare
number
of
elements
in
an
array
DIM
variable
(subscripts)
[,variable(subscripts)]...
Before
arrays
of
variables
can
be
used, the
program
must
first
exe
cute
a
DIM
statement
to
establish
DIMensions
of
the
array
(unless
there
are
11
or
fewer
elements
in
the
array).
The
DIM
statement
is
followed
by
the
name
of
the
array,
which
may
be
any
legal
variable
name.
Then,
enclosed
in
parentheses,
put
the
number
(or
numeric
variable)
of
elements
in
each
dimension.
An
array
with
more
than
one
dimension
is
called
a
matrix.
Any
number
of
dimensions
may
be
used,
but
keep
in
mind
the
whole
list
of
variables
being
created
takes
up
space
in
memory,
and
it
is
easy
to
run out
of
memory
if
too
many
are
used.
Here's
how
to
calculate
the
amount
of
memory
used
by
an
array:
5
bytes
for
the
array
name
2
bytes
for
each
dimension
2
bytes/elements
for
integer
variables
5
bytes/elements
for
normal
numeric
variables
3
bytes/elements
for
string
variables
1
byte
for
each
character
in
each
string
element
U
LJ
256
BASIC
7.0
ENCYCLOPEDIA—Basic
Commands
and
Statements

Table of Contents

Other manuals for Commodore 128D

Related product manuals