EasyManua.ls Logo

Radio Shack TRS-80 Model 3 - Page 181

Radio Shack TRS-80 Model 3
276 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...
This can be a handy short-cut in examining addresses, for example.
Example Program:
940
REM
"WHAT
SIDE
OF
STREET?"
950
REM
EVEN
=
NORTH.
ODD
=
SOUTH
960
INPUT "ADDRESS:
NUMBER
AND
STREET";
ADS
970
C =
INT(VAL(ADS)/2)
* 2
980
IF
C = VAL(AD$)
THEN
PRINT
"NORTH
SIDE":
GOTO
960
<:./90
PRINT "SOUTH
SIDE":
60TO 96(l1
RUN the program, entering streetaddresses like" 1015 SEVENTH
AVE".
If
the string is non-numeric
or
null, VAL returns a zero.
5/9

Related product manuals