home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 11
/
011.d81
/
add-del-view
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
3KB
|
145 lines
10 dimw$(500) ,a$(500), b$(20)
15 print"[147]this is a repair program for the word-
17 [153]"smith. wordsmith's memory is composed
19 print"of many sequential files. this program
21 [153]"allows you to alter those files by
23 print"adding or deleting a word. if you wish,
25 [153]"you may also view the contents of any
27 print"file. the files are named according to
29 [153]"first or second letters: the file 's',
31 print"for example, includes all words begin-
33 [153]"ning with the letter s; whereas the
35 print"file '-s' consists of all words with
37 [153]"second letter s. the program works with
39 print"or without dos wedge in place."
41 print" * * press space bar to begin * *
42 [161] g$:[139] g$[178]""[167]42
43 [139] g$[179][177]" " [167]42
45 [153]"load"
50 [153]"do you wish to:"
55 [153]"1) view a file"
60 [153]"2) add words"
65 [153]"3) delete a word"
70 [161] d$:[139]d$[178]""[167]70
75 [139]d$[178]"1"[167]3050
80 [139] d$[178]"2"[167]100
85 [139] d$[179][177]"3"[167]70
90 [137] 480
100 [153]"load":[133] "how many words (not more than 20)";m
101 [153]"load":[129]k[178]1[164]m :[133]"word to add";b$(k):[130] k
104 [153]:[153]"all correct (y/n)?"
105 [161]c$:[139]c$[178]""[167]105
107 [139]c$[178]"n"[167]50
109 [139]c$[179][177]"y"[167]105
110 [129] l[178]1[164]m:a$[178]b$(l)
118 f$[178][200](a$,1):s$[178][202](a$,2,1)
120 x$[178]"0:"[170]f$[170]",s,r":y$[178]"0:"[170]f$[170]",s,w":z$[178]","
162 [153]"loadadding ";a$
163 [153]"reading file "[170]f$
165 n[178]0: [159]2,8,2,x$
170 [132]2,b$:[139]b$[178]"stop"[176]b$[178]""[167][160]2:[137]200
173 [139]b$[178]a$[167][160]2:[153]"word exists":[129]i[178]1[164]600:[130]i:[137]475
175 n[178]n[170]1:w$(n)[178]b$
180 [137]170
200 w$(n[170]1)[178]a$
201 [129]i[178]0[164]38:[151]1184[170]i,32:[130]i
202 [153]"onsorting-do not disturb disk drive!"
205 [141] 5000
209 [143]
210 [129]i[178]0[164]38:[151]1184[170]i,32:[130]i
215 [153]"onscratching file ";f$
220 [159]15,8,15:[152]15,"s8:"[170]f$:[160]15
230 w$(n[170]2)[178]"stop"
240 [129]i[178]0[164]38:[151]1184[170]i,32:[130]i
245 [153]"onwriting file ";f$
250 [159]2,8,2,y$
260 [129] i [178] 1[164]n[170]2
270 [152]2,w$(i)
280 [130]i
290 [160]2
300 x$[178]"0:-"[170]s$[170]",s,r":y$[178]"0:-"[170]s$[170]",s,w":z$[178]","
302 [129]i[178]0[164]38:[151]1184[170]i,32:[130]i
305 [153]"onreading file -"[170]s$
365 n[178]0: [159]2,8,2,x$
370 [132]2,b$:[139]b$[178]"stop"[176]b$[178]""[167][160]2:[137]400
374 [139] b$[178]a$[167]370
375 n[178]n[170]1:w$(n)[178]b$
380 [137]370
400 w$(n[170]1)[178]a$
401 [129]i[178]0[164]38:[151]1184[170]i,32:[130]i
402 [153]"onsorting-do not disturb disk drive!"
405 [141] 5000
409 [143]
410 [129]i[178]0[164]38:[151]1184[170]i,32:[130]i
415 [153]"onscratching file -"[170]s$
420 [159]15,8,15:[152]15,"s8:-"[170]s$:[160]15
430 w$(n[170]2)[178]"stop"
440 [129]i[178]0[164]38:[151]1184[170]i,32:[130]i
445 [153]"onwriting file -"[170]s$
450 [159]2,8,2,y$
460 [129] i [178] 1[164]n[170]2
465 [152]2,w$(i)
470 [130]i
472 [160]2
475 [130] l
476 [153]"backup (y/n)?"
477 [161]g$:[139]g$[178]""[167]477
478 [139]g$[178]"n"[167]2000
479 [139]g$[179][177]"y"[167]477
480 [153]"put backup disk in drive & hit any key":h$[178]""
481 [161]h$:[139]h$[178]""[167]481
482 [137] 110
485 [153]"load":[133]"word to delete";a$
490 f$[178][200](a$,1):s$[178][202](a$,2,1)
495 x$[178]"0:"[170]f$[170]",s,r":y$[178]"0:"[170]f$[170]",s,w":z$[178]","
500 [153]:[153]"delete ";a$;" (y/n)?"
502 [161]c$:[139]c$[178]""[167]502
504 [139]c$[178]"n"[167]2000
506 [139]c$[179][177]"y"[167]502
565 n[178]0: [159]2,8,2,x$
570 [132]2,b$:[139]b$[178]"stop"[176]b$[178]""[167][160]2:[137]610
575 n[178]n[170]1:w$(n)[178]b$
580 [137]570
610 [159]15,8,15:[152]15,"s8:"[170]f$:[160]15
645 w$(n[170]1)[178]"stop"
650 [159]2,8,2,y$
660 [129] i [178] 1[164]n[170]1
665 [139]w$(i)[178]a$[167]680
670 [152]2,w$(i)
680 [130]i
690 [160]2
750 x$[178]"0:-"[170]s$[170]",s,r":y$[178]"0:-"[170]s$[170]",s,w":z$[178]","
765 n[178]0: [159]2,8,2,x$
770 [132]2,b$:[139]b$[178]"stop"[176]b$[178]""[167][160]2:[137]810
775 n[178]n[170]1:w$(n)[178]b$
780 [137]770
810 [159]15,8,15:[152]15,"s8:-"[170]s$:[160]15
845 w$(n[170]1)[178]"stop"
850 [159]2,8,2,y$
860 [129] i [178] 1[164]n[170]1
865 [139]w$(i)[178]a$[167]880
870 [152]2,w$(i)
880 [130]i
890 [160]2:[137]2000
2000 [153]:[153]"another (y/n)?"
2010 [161]d$:[139]d$[178]""[167]2010
2020 [139] d$[178]"y"[167]45
2030 [139]d$[179][177]"n"[167]2010
2040 [128]
3050 b$[178]"": [153]"load": n[178]0: [133]"file to check";a$
3060 f$[178][200](a$,1):s$[178][202](a$,2,1)
3070 x$[178]"0:"[170]f$[170]s$[170]",s,r"
3080 n[178]0: [159]2,8,2,x$:[153]:[153]"current contents of file ";f$[170]s$;":":[153]
3090 [132]2,b$:[139]b$[178]""[167][160]2:[137]3130
3100 n[178]n[170]1:w$(n)[178]b$:[153]b$,
3105 [139]b$[178]"stop"[167][160]2:[153]"":[153]n[171]1;"words":[137] 2000
3110 [137]3090
3130 [139] n[178]0[167][153]"no such file"
3140 [137]2000
5000 [143]
5030 [129]j[178]1[164]n
5040 [139]w$(n[170]1)[177]w$(j)[167][130]j
5045 v$[178]w$(n[170]1)
5050 [129] k [178]n[170]1[164]j[170]1[169][171]1:w$(k)[178]w$(k[171]1):[130]k:w$(j)[178]v$
5070 [142]