home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2000 June / APC561.ISO / workshop / other / mac / dash.bas next >
Encoding:
BASIC Source File  |  2000-03-21  |  541 b   |  23 lines

  1. 10 open "SFGetFile" for input as #1
  2. 20 open "SFPutFile" for output as #2
  3. 30 linecount = 0
  4. 40 starttime = timer
  5. 45 while not eof(#1)
  6. 50  outl$ = ""
  7. 60  input #1,inl$
  8. 70  for i = 1 to len(inl$)
  9. 80    if mid$(inl$,i,1) = chr$(209) then 
  10. 90      outl$ = outl$+"--"
  11. 100    else 
  12. 110      outl$ = outl$+mid$(inl$,i,1)
  13. 120    endif
  14. 130  next i
  15. 140  print #2,outl$
  16. 150  linecount = linecount+1
  17. 160 wend
  18. 180 stoptime = timer
  19. 190 close #1
  20. 200 close #2
  21. 210 print linecount;" lines processed in ";stoptime-starttime;" sec"
  22. 220 end
  23.