Tandy 1000 Basic Reference Manual page 188

Hide thumbs Also See for 1000:
Table of Contents

Advertisement

Chapter 10 I
BASIC
Ke-ywords
Sample Program
The program below uses INSTR to search through the addresses
contained in the program's DATA statements.
It
counts the num-
ber of addresses with a specified county zip code (761--) and re-
turns that number. The zip code
is
preceded by an asterisk
to
distinguish it from the other numeric data found in the address.
360 RESTORE
3 7 0 COUNTER
=
0
3 9 0 READ ADDRESS$
3 9 5 I F ADDRESS$
=
"SEND"
THEN 4 1 0
4 0 0 I F I N S T R C A D D R E S S S , " * 7 6 1 " )
< >
0 THEN COUNTER
=
COUNTER
+
1 E L S E 390
4 0 5 GOT0 390
4 1 0 P R I N T "NUMBER
OF TARRANT COUNTY, TX
ADDRESSES
I S "
COUNTER : END
4 2 0 DATA " 5 9 5 0
GORHAM D R I V E , BURLESON,
TX
* 7 6 1 4 8 "
4 3 0 DATA " 7 1
F I R S T F I E L D ROAD, G A I T H E R S B U R G , MD
*
2 0 7 6 0
'I
4 4 0 DFlTA " 1 0 0 0
TWO TANDY CENTER,
FORT WORTH, TX
* 7 6 1 0 2 "
4 5 0 DATA " 1 6 6 3 3
SOUTH CENTRAL EXPRESSWAY,
R I C H A R D S O N , TX ~ 7 5 0 8 0 "
4 6 0 DATA . " $ E N D "
186

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents