EasyManua.ls Logo

Commodore PET - Get

Commodore PET
447 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...
Format Variations
GET
has
other formats.
but
they are defective and it
is
not recommended
that
they
be
used. These variations are described below.
GET
may
be
used
to
fetch a numeric variable:
GET
var
where:
var
is
a numeric variable.
If no key
has
been pressed a zero
is
returned. However. a zero
is
also
returned if a zero was pressed at the keyboard. If the character returned
is
not
a
digit
(0-9)
aSYNTAX
ERROR
message
is
generated and the program aborts.
The
GET
statement may have a variable list of the form:
GET
var.var
.....
var
where:
GET#
var
is
a string or numeric variable.
The Get External statement (GET#) inputs one character from an external
peripheral device
to
the
PET.
Format:
GET#file.var
where:
file
is
the logical file
number
that
was given
when
the file was opened.
var
is
a string or numeric variable
into
which
the
character
is
to
be
input.
GET#
functions like the
GET
command except
that
the character
is
fetched
from
an
external device.
GET#
is
valid only in program mode and only
when
referencing a logical file
that
has
been opened for input. For
input
from the tape cassette.
PET
prints the
following message
if
no tape control keys are pressed
when
the
GET#
statement
is
executed. Otherwise. no messages are printed.
PRESS
PLAY
ON
TAPE
#1
OK
1 when a tape control key
is
depressed
Example:
10 GET#4.C$:IF C$
= ....
GOTO
10
130

Table of Contents

Related product manuals