17.01.2013 Views

AmstradCPC6128-hypertext-en-Sinewalker

AmstradCPC6128-hypertext-en-Sinewalker

AmstradCPC6128-hypertext-en-Sinewalker

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Beware the mismatch ....<br />

Obvious errors, such as the wrong number of parameters, are reported as a 'Bad<br />

Corn m and' error. However, the mechanism of external commands does not detect<br />

errors of the 'Ty p e m ism ate h' variety, and the user must <strong>en</strong>sure that the correct<br />

form of parameters are employed.<br />

The program below uses the RAMdisc commands to set up and interrogate a database<br />

containing anagrams of7 -letter words. It searches for matches, and you may use wild<br />

cards.<br />

For example, anagrams of the word FIG U RES which match with ? RUG S ?? (the<br />

two last ?? can be left off if you wish) are F RUG S lE, F RUG S El, I RUG S FE,<br />

I RUG S E F, E RUG S F I , and I RUG S IF.<br />

The database takes some time to create, but th<strong>en</strong> 64K is a lot of memory to fill!<br />

10 'ANAGRAMS by ROLAND PERRY<br />

20 ' copyright (c) AMSOFT 1985<br />

30 '<br />

40 'Remember to RUN "BANKMAN" before running program<br />

50 '************************************************<br />

60 '<br />

70 MODE 2<br />

80 DEFINT a-z<br />

90 r%=0: IBANKOPEN,7<br />

100 INPUT"What 7 letter word to scramble ";s$<br />

110 IF LEN(s$)7 THEN 100<br />

120 PRINT"Please wait ••. "<br />

130 LOCATE 1,5:PRINT"Computing:"<br />

140 FOR c1=1 TO 7<br />

150 FOR c2=1 TO 7<br />

160 IF c2=c1 THEN 370<br />

170 FOR c3=1 TO 7<br />

180 IF c3=c2 OR c3=c1 THEN 360<br />

190 FOR c4=1 TO 7<br />

200 IF c4=c3 OR c4=c2 OR c4=c1 THEN 350<br />

210 FOR c5=1 TO 7<br />

220 IF c5=c4 OR c5=c3 OR c5=c2 OR c5=c1 THEN 340<br />

230 FOR c6=1 TO 7<br />

240 IF c6=c5 OR c6=c4 OR c6=c3 OR c6=c2 OR c6=c1 THEN 3<br />

30<br />

250 FOR c7=1. TO 7<br />

260 IF c7=c6 OR c7=c5 OR c7=c4 OR c7=c3 OR c7=c2 OR c7=<br />

c1 THEN 320<br />

Continued on the next page<br />

More About the Bank Manager .... Chapter 8 Page 7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!