home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 134
/
134.d81
/
sort.cat
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
569b
|
18 lines
10 dv=peek(186):ifdv<8thendv=8
20 printchr$(14):close15:open15,dv,15:dimb$(40,1):open2,dv,2,"0:categories,s,r":gosub1000
30 v=0:fori=1to40:forj=0to1:input#2,b$(i,j):ifb$(i,0)="-1"thenv=i-1:i=40
40 next:next:close2
50 s=0:fori=1tov-1:ifb$(i,0)<b$(i+1,0)then75
60 b$(0,0)=b$(i,0):b$(0,1)=b$(i,1):b$(i,0)=b$(i+1,0):b$(i,1)=b$(i+1,1):
70 b$(i+1,0)=b$(0,0):b$(i+1,1)=b$(0,1):s=1
75 next:ifsthen50
80 fori=1tov:forj=0to1:printb$(i,j),:next:print:next
90 print#15,"s0:categories":gosub1000
100 close2:open2,dv,2,"0:categories,s,w":gosub1000
110 fori=1tov:forj=0to1:print#2,b$(i,j):gosub1000
120 next:next:print#2,"-1":print#2,"0":close2:close15:end
1000 input#15,er,em$,et,es
1010 ifer<20then1030
1020 printer;em$;et;es:stop
1030 return