EasyManuals Logo

Sharp MZ-800 User Manual

Sharp MZ-800
221 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #86 background imageLoading...
Page #86 background image
INPUT
Format
Explanat
ion
|
INPUT
[<message
>
;]
<
variable
>[,<variable>]
...
Abbreviated
Format
The
INPUT
statement
reads
data
entered
during
program
execution
and
assigns
it
to
<variable>.
When
an
INPUT
statement
is
encountered
during
program
execution,
execution
stops,
a
question
mark
appears,
and
the
cursor
blinks
to
indicate
that
the
program
is
wait-
ing
for
data.
If
<message>
is
specified,
the
message
is
displayed
instead
of
the
question
mark.
After
data
is
typed
in
from
the
keyboard
and
[
CR
]
is
pressed,
the
data
is
assigned
to
<
variable
>,
then
program
execution
resumes.
The
types
of
the
data
and
<variable>
must
be
the
same.
Character
constants
can
be
entered
without
double
quotes.
In
such
cases,
any
leading
or
trailing
spaces
are
ignored.
However,
if
leading
or
trailing
spaces
or
commas
are
to
be
included
in
the
constant,
enclose
the
entire
character
string
in
double
quotes.
Example
10
INPUT
A,B$
vo.
Allows
data
to
be
entered
and
displays
?.
When
you
have
entered
the
data,
the
program
assigns
the
first
item
to
variable
A
and
the
second
item
to
variable
BS.
20
INPUT
"A=";
A...........
Displays
message
‘‘A=""
and
waits
for
data
to
be
typed
in.
GET
Format
GET
<variable>
Explanation
The
GET
statement
checks
whether
any
key
on
the
keyboard
is
being
pressed,
and
if
so,
assigns
the
key
value
to
the
variable
specified
in
<variable>.
The
variable
will
be
left
empty
(0
for
a
numeric
variable
or
null
for
a
string
variable)
if
no
keys
are
pressed,
With
numeric
variables,
this
statement
allows
a
single
digit
(from
0
to
9)
to
be
en-
tered;
with
string
variables,
it
allows
a
single
character
to
be
entered.
Any
non-numeric
value
entered
for
a
numeric
variable
will
be
ignored.
10
GET
AS:
IF
AS="'
''
THEN
10
20
PRINT
A$
30
END
This
program
displays
a
character
entered
from
the
keyboard
if
the
character
is
printable.
6-29

Other manuals for Sharp MZ-800

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Sharp MZ-800 and is the answer not in the manual?

Sharp MZ-800 Specifications

General IconGeneral
BrandSharp
ModelMZ-800
CategoryDesktop
LanguageEnglish

Related product manuals