EasyManua.ls Logo

Commodore Plus 4 - Page 74

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...
62
The
BASIC
Language
3.
The
length
of
the
substring
can
be
any
length.
If
it
is
greater
than
the
number
of
characters
after
the
start
position
in
the
master
string,
the
entire
rest
of
the
string
is
returned.
The
length
can
be
omitted.
If
it
is
omitted,
all
of
the
string
after
the
start
position
is
returned.
MID$
can
also
be
used
on
the
left
side
of
an
equation
to
replace
a
substring
of
a
given
length
within
the
master
string.
Examples:
PRINT
MID$(''GRADUATE'',6,3)
ATE
10
INPUT
"ENTER
THE
NEXT
MODEL";
A$
Examines
five
char-
20
IP
MID$(A$,6,5)<>"WAG0N"
THEN
END
acters
starting
at
30
MID$(A$,6,5>"SEDAN":
PRINT
A$
character
6
for
the
RUN
string
WAGON.
ENTER
THE
NEXT
MODEL
?
4-DR
WAGON
WAGON
is
replaced
4-DR
SEDAN
by
SEDAN.
PRINT
MID$("R0CKETSHIP",7)
SHIP
MONITOR
Abbr.
mO
Leaves
BASIC
and
goes
to
the
built-in
machine-language
monitor.
You
can
use
the
13
machine-language
monitor
commands
to
write
and
execute
programs
in
machine
language.
Return
to
BASIC
from
the
monitor
by
typing
X
and
pressing
the
RETURN
key.
See
Chapter
5
for
more
information
on
machine
language.
NEW
Abbr.
none
Erases
the
current
program
from
memory.
The
program
cannot
be
recalled
unless
it
is
saved
on
tape or
disk.
(If
you
execute
a
NEW
accidentally
and
want
to
try
to
retrieve
your
program,
see
Chapter
3
for
information
on
unNEWing.)
Always
issue
a
NEW
command
before
you
start
writing
a
new
program
to
be
sure
the
program
area
of
memory
is
clear.
If
you
do
not
clear
the
memory,
lines
from
the
previous
program
will
mix
with
your
current
program.
NEXT
Abbr.
nE
Marks
the
closing
bracket
of
a
FOR
loop.
See
FOR.

Other manuals for Commodore Plus 4

Related product manuals