Dec 222017
 
Break BASIC programs into separate files by subroutine.
File READSUB2.ZIP from The Programmer’s Corner in
Category BASIC Language
Break BASIC programs into separate files by subroutine.
File Name File Size Zip Size Zip Type
REGISTER.FRM 2188 503 deflated
READSUB.EXE 54960 38761 deflated
DIAG.BAT 1510 401 deflated
DIAG.BAS 2560 1028 deflated
READSUB.DOC 5828 2419 deflated
TPCREAD.ME 199 165 deflated

Download File READSUB2.ZIP Here

Contents of the READSUB.DOC file


=-=-=-=-=-=-=-==-=-=-=-=-=-=-==-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
READSUB - A QuickBasic/ MS Professional Basic Utility
=-=-=-=-=-=-=-==-=-=-=-=-=-=-==-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Version 2.0 Release Date: 08/24/91


INTRODUCTION: ReadSub is a utility which parses uncompiled Basic programs
(source code) written in QuickBasic, Professional Basic and some other
brands of Basic. It takes every Subroutine and Function in the chosen
program and creates a separate basic file for each one. The purpose of
ReadSub is to enable the Basic programmer to use these parsed subroutines
and functions from one Basic program in others. For those who haven't yet
done it, to "import" a subroutine or function into an ongoing basic
program, name and create the subroutine or function, go to that area,
and choose ALT/F, then "M" (for merge). You'll see a directory of all
.bas programs; you'll have the option to change directories. When you
find the .bas you want to load as the routine, highlight it and press
Enter: it will be imported into that routine's area (at the cursor location).

SHAREWARE / WARRANTY STATEMENT: ReadSub is marketed as shareware. You may
use the program for up to one month, and if you like it and choose to
continue using it, you are legally and ethically required to pay for it.
The cost to register ReadSub is a miniscule $7, and you'll be able to
sleep better at night! Re warranty, there is NO warranty for ReadSub:
you use this program entirely at your own risk (we gotta say that).

INCLUDED FILES:
Readsub.exeThe executable program
Register.frm ReadSub registration form
Readsub.doc The documentation you're currently reading
Diag.bas QuickBasic diagnostic source code program
Diag.bat Batch file to run diag.bas

USING READSUB: Put Readsub.exe and the basic program (which must have the
.bas extension) in the same subdirectory. You now have two options:

1) Call readsub. When prompted, enter the name of the basic program
(either with or without the .bas extension). If you've forgotten
its name, hit for listing of all .bas files in the current
directory.
2) Call readsub, and include the basic program's name on the command
line, as (for example): readsub program.bas
(The '.bas' is optional, though the name of the basic program to
be extracted must end in .bas), as: readsub program

Each subroutine and function will be extracted into a separate .bas file,
using the name of the sub or function. If its name is more than eight
characters, its filename will be the first eight characters of the sub or
function. If the sub or function contains a nonvalid filename character,
the filename will not include that character (unless our parser misses
that character, in which case the program will terminate, but all subs
and functions up to that point will still have been saved).

Keep in mind that the subs and functions you extract will most probably
include constants and variables which were originally defined in the
program's main module and/or processed by other modules. You'll have to
take into account the fact that any new Basic program using these
extracted routines may need to properly define these constants and
variables.

OPTIONS: You may choose to extract ONE subroutine from your source file.
just add a space (or a slash ["/"]) and the name of the sub you wish
extracted.
Here's an example command line: readsub program.bas /onesub
Here's another: readsub program.bas onesub
The ".bas" extension need not be used, so for most efficient calling,
this example illustrates: readsub program onesub

CAUTIONS: (1) Be sure the .bas program was saved in ASCII mode
(2) It's safest to have readsub.exe in the same directory
as your source code file, and BE in that directory when
calling readsub.
(3) Although tested on a wide variety of source code, it is
possible that unique sub or function names could cause
a problem. If this could be the case, consider changing
a sub or function name from, e.g., "xf_s%[email protected]" to,
perhaps, "trnsfrmx"

DIAGNOSTICS: Included are two diagnostic files, which need only be used
if you're having a problem running ReadSub. Include these files in the
same directory as readsub.exe, and run diag.bat by typing "diag". This
diagnostic program will extract one subroutine, and if successful,
extract all subs and functions from diag.bas. If the total extraction
is also successful, you will be informed, and the extracted files will
be deleted. If successful, and you're still having a problem, attempt
to run ReadSub on Diag.bas manually, by typing readsub diag oops
(to extract the "oops" sub), and then readsub diag (to extract all
subs and functions (5 of them) from diag.bas). If these tests are
successful and you're STILL having a problem, call our Support BBS
for assistance.

SUPPORT: Registered and NON-registered users may receive assistance by
calling the Suncoast Software Systems support BBS, Suncoast City BBS,
at 813-953-5505 (12/2400 baud, soon to be 9600 baud v.32, 24 hrs).
Suggestions for improvements are also welcome!

HISTORY:

8/24/91 Version 2.0: Added single sub/function extraction: debugged
a couple of nasty ones; added diagnostic utility
8/02/91 Version 1.1: Sharpened algorithms, added file listing
7/31/91 Version 1.0: First Release


=-=-=-=-=-=-=-==-=-=-=-=-=-=-==-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


 December 22, 2017  Add comments

Leave a Reply