EasyManua.ls Logo

Commodore 128D - Page 329

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...
f
!
\
PEEK
;
\
length
(range
0-255)
of
the
string,
or
if
the
length
value
is
zero,
then
MID$
returns
a
null
string
value.
If
the
length
argument
is
left
out,
all
characters
to
the
right
of
the
starting
position
are
returned.
EXAMPLE:
PRINT
MID$rCOMMODORE
128",3,5)
MMODO
MID$
(string,
starting
position
[,length])
=
substring
MID$
can
also
be
used on
the
left
side
of
an
equals
sign,
to
place
characters
into
a
string.
In
this
mode
characters
are
copied
from
the
beginning
of
the
substring
to
the
string
starting
at
the
starting
posi
tion.
New
characters
replace
old
characters
in
the
string.
The
num
ber
of
characters
copied
is
indicated
by
length.
Length
cannot
be
longer
than
the
number
of
characters
in
the
substring.
If
there
are
more
characters
to
copy
than
would
fit
into
the
string,
the
extras
are
ignored.
The
string
will
always
be
the
same
length
before
and
after
this
operation.
EXAMPLE:
A$
=
"123456789"
MID$
(A$,3,4)
=
"ABCDEF"
PRINT
A$
12ABCD789
—Return
contents
of
a
specified
memory
location
PEEK(X)
This
function
returns
the
contents
of
memory
location
X,
where
X
is
located
in
the
range
0
to
65535,
returning
a
result
between
0
and
255.
This
is
the
counterpart
of
the
POKE
statement.
The
data
will
be
returned
from
the
bank
selected
by
the
most
recent
BANK
com
mand.
See
the
BANK
command.
EXAMPLE:
10
BANK
15:VIC
=
DECf'DOOO")
20
FOR
I
=
0
TO
48
30
PRINT
PEEK(VIC
+
I)
40
NEXT
This
example
displays
the
contents
of
the
registers
of
the
VIC
chip.
321
BASIC
7.0
ENCYCLOPEDIA-Basic
Functions

Table of Contents

Other manuals for Commodore 128D

Related product manuals