home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / BASIC / BASIC00.ZIP / EDIPAGE.BAS < prev    next >
Encoding:
BASIC Source File  |  1987-01-11  |  2.1 KB  |  54 lines

  1. 100 'EDIPAGE
  2. 120 '   by      Art Schneider  Feb 8 1982
  3. 125 '            Boston Computer Society, IBM Personal Computer Users Group
  4. 130 '
  5. 140 ' DESCRIPTION
  6. 150 '   Lists an ASCII file in page formate; 50 lines per page
  7. 155 '   with FILE NAME,  REMARKS,  DATE,  PAGE NUMBER on page top
  8. 158 '   and either  `continued'  or  `end'  at page bottom.
  9. 160 '   Start printer at aprox. six lines down with continous feed paper
  10. 162 '
  11. 170 '   Used on 80 column printer width & Spinwriter 7730
  12. 180 '
  13. 190 DEFINT A-Z
  14. 200 WIDTH "lpt1:",80            'print line width, alter if desired
  15. 300 LP = 50                     'lines of file per page, alter if desired
  16. 500 '
  17. 1000 PRINT "Page List Program"
  18. 1100 PRINT
  19. 1150 PRINT "File you want to list must be saved in ASCII { see `A OPTION' }"
  20. 1200 COLOR 15,0 : INPUT "Full ASCII File Name   d:name.ext ";ASCIIFILE$
  21. 1220 '
  22. 1225 'Listing file name as printed may differ from actual disk file name
  23. 1227 'per the next input.  The next input name will print to the left top of
  24. 1230 'of each page.  Current date and page number will print at the right.
  25. 1240 '
  26. 1250 PRINT : INPUT "List heading file name........";HEAD$
  27. 1260 INPUT "2 = Screen    1 = printer  (1 or 2)";FF
  28. 1270 ON FF GOTO 1300,1350
  29. 1300 OPEN "lpt1:" FOR OUTPUT AS #FF :GOTO 1400
  30. 1350 OPEN "scrn:" FOR OUTPUT AS #FF
  31. 1400 OPEN ASCIIFILE$ FOR INPUT AS #3
  32. 1430 '
  33. 1440 'Use a short discriptive comment about file on next input.
  34. 1442 'This heading will center on each page of the listing
  35. 1445 '
  36. 1450 PRINT : INPUT "Short heading remark";REMLINE$
  37. 1500 PAGE =0 : COLOR 7,0 : PRINT : TB = 5
  38. 1600 PAGE = PAGE + 1 : GOSUB 3000
  39. 2000 '
  40. 2100 K = K+1
  41. 2200 IF K = LP THEN PRINT #FF, "  " : PRINT #FF, TAB(30) "continued" CHR$(12):GOTO 1600
  42. 2300 LINE INPUT #3,A$
  43. 2320 LA = LEN(A$) :IF LA > 80 THEN K= K+1 : IF LA > 160 THEN K = K +1
  44. 2400 PRINT #FF,  A$
  45. 2500 IF EOF(3) THEN 6000 ELSE 2100
  46. 3000 PRINT #FF, HEAD$ TAB(20) REMLINE$ TAB(60) DATE$ "  page" PAGE
  47. 3100 PRINT #FF, " ": PRINT #FF, " ":K=0 : RETURN
  48. 6000 PRINT #FF, " "
  49. 6100 PRINT #FF, " "
  50. 6300 PRINT #FF, TAB(30) "end" CHR$(12)
  51. 6400 CLOSE : END
  52. INT #FF, " ":K=0 : RETURN
  53. 6000 PRINT #FF, " "
  54. 6100 PRIN