Category : BASIC Source Code
Archive   : QBFAQR01.ZIP
Filename : PAGER.BAS

 
Output of file : PAGER.BAS contained in archive : QBFAQR01.ZIP
'File: PAGER
'Date: 2/1/92
'Written By: Luis Espinoza
'Description: Pager is a simple program that will slice a text file
'into separate smaller files. Generally used for slicing large text
'or source files (hint, hint) to be posted on BBS.
'
'PAGER command line:
' PAGER filename nn
'
' filename - text file to work on
' nn - number of output lines per file
'
PRINT " PAGER"
PRINT "Copyright 1992"
PRINT "Micro Miracles"
PRINT "--------------"
sp = INSTR(COMMAND$, " ") + 1
fi$ = LEFT$(COMMAND$, sp)
lin = VAL(MID$(COMMAND$, sp))
IF DIR$(fi$) = "" THEN
PRINT "usage:"
PRINT "PAGER filename nn"
PRINT
PRINT "Pager creates smaller files of text files."
PRINT "It takes a text file and slices it to nn lines per file"
PRINT "all files are numberd filename.xxx where xxx is between" PRINT
END
END IF
fi = 0
lc = 0
nf$ = LEFT$(fi$, INSTR(fi$, ".") - 1)
OPEN fi$ FOR INPUT AS #1
ON ERROR GOTO doneread
WHILE NOT EOF(1)
LINE INPUT #1, a$
IF lc = 0 THEN
e$ = MID$(STR$(fi), 2)
DO WHILE LEN(e$) < 3
e$ = "0" + e$
LOOP
OPEN nf$ + "." + e$ FOR OUTPUT AS #2
fi = fi + 1
END IF
PRINT #2, a$
lc = lc + 1
IF lc = lin THEN
CLOSE #2
lc = 0
END IF
WEND
doneread:
CLOSE
fi = fi - 1
PRINT fi; "Files created"


  3 Responses to “Category : BASIC Source Code
Archive   : QBFAQR01.ZIP
Filename : PAGER.BAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/