home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / portfoli / rg / strip.bas < prev   
Encoding:
BASIC Source File  |  1991-08-21  |  851 b   |  24 lines

  1. 1 ' This program will take a Portfolio file and remove all carriage
  2. 2 ' returns, except where two are found consequetively. In that case
  3. 3 ' a hard return is inserted. This means that a hard carriage return
  4. 4 ' must be used to separate paragraphs in the Portfolio's editor or
  5. 5 ' the "EDIT" program.
  6. 6 '
  7. 7 ' R. Gigengack 2-9-90
  8. 8 '
  9. 100 INPUT "Name of the input file:  ",F$
  10. 110 INPUT "Name of the output file: ",O$
  11. 120 OPEN F$ FOR INPUT AS #1 : OPEN O$ FOR OUTPUT AS #2
  12. 130 IF EOF(1) GOTO 1000
  13. 140 L$=INPUT$(1,#1)
  14. 150 IF ASC(L$)=13 GOTO 200
  15. 160 PRINT#2,L$; : GOTO 130
  16. 200 M$=INPUT$(1,#1) : IF EOF(1) GOTO 1000
  17. 205 N$=INPUT$(1,#1)
  18. 210 IF ASC(N$)=13 GOTO 300
  19. 220 IF N$=" " THEN PRINT#2,N$; ELSE PRINT#2," ";N$;
  20. 230 GOTO 130
  21. 300 PRINT#2,"" : PRINT#2,"" : L$=INPUT$(1,#1)
  22. 310 GOTO 130
  23. 1000 PRINT#2,"" : CLOSE(1) : CLOSE(2) : SYSTEM
  24. ə