Beware The Mismatch - AMSTRAD cpc 6128 User Instruction

Integrated computer/disc system
Hide thumbs Also See for cpc 6128:
Table of Contents

Advertisement

Beware the mismatch ....
Obvious errors, such as the wrong number of parameters, are reported as a 'Bad
Corn m and' error. However, the mechanism of external commands does not detect
errors of the 'Ty p e
m ism
ate h' variety, and the user must ensure that the correct
form of parameters are employed.
The program below uses the RAMdisc commands to set up and interrogate a database
containing anagrams of7 -letter words. It searches for matches, and you may use wild
cards.
For example, anagrams of the word FIG U RES which match with ? RUG S ?? (the
two last ?? can be left off if you wish) are F RUG S lE, F RUG S El, I RUG S FE,
I RUG S E F, E RUG S F I , and I RUG S IF.
The database takes some time to create, but then 64K is a lot of memory to fill!
10 'ANAGRAMS by ROLAND PERRY
20 ' copyright (c) AMSOFT 1985
30 '
40 'Remember to RUN "BANKMAN" before running program
50
'************************************************
60 '
70 MODE 2
80 DEFINT a-z
90 r%=0: IBANKOPEN,7
100 INPUT"What 7 letter word to scramble ";s$
110 IF LEN(s$)<>7 THEN 100
120 PRINT"Please wait ••. "
130 LOCATE 1,5:PRINT"Computing:"
140 FOR c1=1 TO 7
150 FOR c2=1 TO 7
160 IF c2=c1 THEN 370
170 FOR c3=1 TO 7
180 IF c3=c2 OR c3=c1 THEN 360
190 FOR c4=1 TO 7
200 IF c4=c3 OR c4=c2 OR c4=c1 THEN 350
210 FOR c5=1 TO 7
220 IF c5=c4 OR c5=c3 OR c5=c2 OR c5=c1 THEN 340
230 FOR c6=1 TO 7
240 IF c6=c5 OR c6=c4 OR c6=c3 OR c6=c2 OR c6=c1 THEN 3
30
250 FOR c7=1. TO 7
260 IF c7=c6 OR c7=c5 OR c7=c4 OR c7=c3 OR c7=c2 OR c7=
c1 THEN 320
Continued on the next page
More About the Bank Manager ....
Chapter 8 Page 7

Advertisement

Table of Contents
loading

Table of Contents

Save PDF