Intel 9800758-02 Webcam User Manual


 
Functions
7-10
PEEK
The PEEK function reads a single byte from memory
at
the location specified. The
corresponding
POKE statement writes a byte into a specified memory location.
PEEK (expression)
PRINT PEEK(OFABH)
200
P~S
The POS function returns the position
of
the cursor after the last PRINT statement.
The argument I
is
a dummy argument. The leftmost position
is
1.
POS (integer)
10
INPUT
A$
20
PRINT A$;
30
IF POS(1) >
10
THEN
PRINT
40
PRINT
"HAS
JUST
BEEN
INPUT"
RUN
?AAAAA
AAAAA
HAS
JUST
BEEN
INPUT
OK
RUN
?AAAAAAAAAAA
AAAAAAAAAAA
HAS
JUST
BEEN
INPUT
Ok
RIGHTS
The RIGHT$ function returns the rightmost I characters
of
string X$.
If
I equals
or
exceeds the length
of
X$, the entire string
is
the result.
If
I
is
0,
a null string results.
RIGHT$ (string,integer)
10
A$
=
"JOHN
J.
JONES"
20
X$
= RIGHT$(A$,8)
30
PRINT
X$
RUN
J.
JONES
Ok
RND
The RND function returns a single precision random number between 0 and
1.
The
sequence produced
is
identical every time a program
is
run.
If
this
is
undesirable
(such as in games) use
RANDOMIZE to prompt the user for a seed.
RND
BASIC-80