EasyManua.ls Logo

Sharp PC-1500 - In Keys

Sharp PC-1500
169 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
Loading...
A
ll
and more about Sharp PC-1500
at
http://www.PC-1500.info
Example 2:
10 z = 65
20
PRINT CH
RS
Z
Ou
tput:
HU
N
A
The first e
xa
mp
le shows the u
se
of
an
ASC
II dc·cim
al
code as
an
argument. The
resu
lt is con·
catcnatcd
to t
he
st ring
"OP"
producing "COP",
The
second
example assig"' a numeric
va
l
ue
to t
he
va
ri
able Z. The
va
ri
ab
le name is then used as the
il
rgum
cnt.
resulting in
the
character "A",
Our
next
sa
rnp
le p
ro
gram
COl'
lver
ts
the upper ca
se
characters in a text s
tri
ng
to lo\ver·case using
both the ASC
and
the STRS function
s:
E
xa
mple
3:
5
WAIT 0
10
INPUT
"E
NTER MESSAGE ... MS
20
FOR I = 1
TO
LEN
{MS)
30 TS = MIDS
(MS
, I,
11
40 L =
ASC
{T
S)
45
IF
!L<65l
OR
!L>90)
THEN
60
50
TS = CH
RS
{L + 32)
60
PR
I
NT
TS;
70
N
EXT
I
80
WA
I
T:
PR
I
NT
C.3.
IN
KEYS
This function takes in
any
cha
r
ac
ter from the keyboard and stores it in the specifi
ed
va
riable.
Thete is no need
to
p(ess !
ENTE
AI because the char
acte
r w
il
l be automatically accepted.
vari
ab
le = IN KEYS
Dur
i
n~J
executi
on
of
t
hi
s sta
te
rn
en
t a prompt char
ac
ter is not displayed unless a pre
vi
ous
PR
INT statemeot is u
sed.
The input character is
not
ec
h
oed
bac
k
to
the di
spl
ay and t
he
di
sp
lay
remai
ns
unaffected .
Example:
1.0
WA
IT
lif
20
A$
= IN KEYS
30
IF
A$
= " .. THEN
PR
INT
"NO
K
EY":
GOTO
21if
40 PRINT
AS
50
GOTO
2fl
This function will only
accep
t one character.
If
more than
one
is k
eyed
. only the first character
\viii
be
read in;
al
I others will
be
ignored.
74
Do
not sale this PDF
!!!

Table of Contents

Other manuals for Sharp PC-1500

Related product manuals