home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disk User Volume 3 #12 / Commodore_Disk_User_Vol.3_12_1990_-.d64 / supersort64 (.txt) < prev   
Commodore BASIC  |  2022-10-26  |  1KB  |  25 lines

  1. 10 rem supersort
  2. 20 rem sorts superscript file
  3. 30 rem starting at selected character
  4. 40 rem copyright jan 1990, mike gregory
  5. 50 :
  6. 60 dimc$(100):cr$=chr$(13)
  7. 70 open15,8,15,"i0"
  8. 80 open6,8,6,"0:sortfile,s,r":gosub220:ifergoto170
  9. 90 gosub190
  10. 100 n=n+1:c$(n)=c$:ifleft$(c$,3)<>"***"goto90
  11. 110 f$="0:"+mid$(c$,4)+",s,w"
  12. 120 open7,8,7,f$:gosub220:ifergoto170
  13. 130 fori=1ton-1:print#7,c$(i):next
  14. 140 gosub190
  15. 150 s=val(mid$(c$,4))-1
  16. 160 poke2980,s:sys2568:gosub220
  17. 170 close6:close7:close15:end
  18. 180 :
  19. 190 c$=""
  20. 200 get#6,a$:ifa$<>cr$thenc$=c$+a$:goto200
  21. 210 return
  22. 220 input#15,er,er$,t,s
  23. 230 iferthenprint""er;er$;t;s
  24. 240 return
  25.