'===========================================================================
' Subject: QBMORE V1.00 (LIKE DOS MORE)       Date: 04-10-99 (02:41)       
'  Author: Oliver Rigby AKA Tirin             Code: QB, PDS                
'  Origin: tirin@btinternet.com             Packet: MISC.ABC
'===========================================================================
'QBMore v1.00 - Alternative to MORE (Future versions won't be made til bugs)
'Needs Quickbasic 4.5 or 7.1 PDS
'A simple file viewer which I made using LINE INPUT. God only knows why
'almost NOBODY uses the command! It uses ERROR checking because when
'you compile it terminates the File not found errors which look AWFUL.
'When compiled it is over x4 the size of MORE. Hey, it's in BASIC.
'Made to look EXACTLY like MORE! - Sorry about the messy code, but hey
'it works. The main difference between MORE and QBMORE is: CTRL+BREAK :))
'Tested to handle over 63 thousand lines, but I gave up when it got that far.
':))) IT NEEDS TO BE COMPILED TOO WORK, I CANNOT STRESS THIS MORE! (Damn Pun)

'Soon to come - QBMoreEx, QB More Extreme, with new features and such and
'won't be identical to More!

'By Oliver Rigby AKA Tirin
'Give me credit if you use it in your programs and remember to not laugh
'when somebody uses LINE INPUT to read file
ON ERROR GOTO ErrDone 'If theres an error go to error checking
IF COMMAND$ = "" THEN GOTO MoreEmu 'If it has nothing on there, do what MORE
                                   'does, kinda screws. More and This are
                                   'Identical to the last detail!
IF COMMAND$ = "?" THEN GOTO Help
IF COMMAND$ = "/?" THEN GOTO Help   'If they do /? or ? then goto MORE's help.
file$ = COMMAND$ 'Just saved a bit of time
SKIP: OPEN file$ FOR INPUT AS #1 'Open for input
PRINT 'Add a first line.
DO 'Start Loop                 
LINE INPUT #1, THEONE$ 'Get a line
PRINT THEONE$ 'Print the line
I = I + 1 'Every time it goes through add one
IF I = 24 THEN GOTO REDO 'If the screen is full then goto redo
GOTO STATLOOP 'Statloop skips REDO
REDO: I = 0 'Resets I
LOCATE 25, 1 'Locates for the below
PRINT "--More--"
DO 'Start of the loop for --More--
LOOP WHILE INKEY$ = "" 'Wait for a key press.
STATLOOP: 'For the GOTO
LOOP
ErrDone: SELECT CASE ERR 'Error Checking
CASE 52
PRINT "Invalid file name in command line" 'A standard error message from MORE
END
CASE 53
PRINT "Invalid file name in command line" 'Look above :))
END
CASE 64
PRINT "Invalid file name in command line" 'And again
CASE ELSE
END 'Got any more problems? End them! (Sorry about the joke. couldn't help it)
END SELECT  'End the select
MoreEmu: PRINT 'Puts PRINT at the top like MORE
DO 'Weird thing on MORE then you use no command-line on MORE.
INPUT "", a$  'Ok, the ONLY reason I did this was because MORE has it. Ok?
              'I know it doesn't support commas.
PRINT a$      'Print what was on the input
LOOP 'Loop
Help: PRINT "Displays output one screen at a time." 'Same help as MORE but
PRINT                                               'replaced MORE with QBMORE
PRINT "QBMORE [drive:][path]filename"
PRINT "QBMORE < [drive:][path]filename"
PRINT "command-name Ý QBMORE [drive:][path]filename"
PRINT
PRINT "  [drive:][path]filename  Specifies file(s) to be display one screen at a time"
PRINT "  command-name            Specifies a command whose output to be displayed."
