🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Richard Vannoy Tue, 22 Dec 1992 21:46
Advice on SUB and FUNCTIO
#326
Author: Richard Vannoy
Date: Tue, 22 Dec 1992 21:46
36 lines
1782 bytes
GY>    1.   Compile a list of all FUNCTIONS and SUBROUTINES called in
GY>         the programs.
GY>    2.   Compile a list of all FUNCTIONS and SUBROUTINES declared in
GY>         the programs.

I did something similar once.  This type of program would
compile all files, one by one, into a master text or random
access file which could then be sorted by function, program,
etc.

Since there are so many ways to do this, like reading in all
the .BAS file names automatically and such improvements, I'll
use abbreviated or pseudo code.

DO
   OPEN "WHATEVER" FOR RANDOM (OR OUTPUT) AS #2
   INPUT "Enter the file name ";filname$
   IF filename$ = "" THEN CLOSE & END program
   OPEN filname$ FOR INPUT AS #1
   DO
       LINE INPUT #1,l$
       IF LEFT$(l$,8) = "DECLARE "
          OR LEFT$(l$,4) = "SUB "
          OR LEFT$(l$,9) = "FUNCTION " THEN
             PRINT #2, filename$ + " " + l$
             'Write it out to the data file, keeping
             'the original file name with it
   LOOP WHILE NOT EOF(1)
LOOP UNTIL forever

Once you get all the DECLARE, SUB and FUNCTION lines in one
place, along with the original files they came from, you can
check, manipulate and cross reference just about any way you
want.
--- MegaMail 2.10 #0
                                  
Re: Advice on SUB and FUNCTIO
#339
Author: Gregory Youngblood
Date: Wed, 23 Dec 1992 13:47
38 lines
2062 bytes
richard.vannoy@filebank.cts.com (Richard Vannoy)  writes:

> GY>    1.   Compile a list of all FUNCTIONS and SUBROUTINES called in
> GY>         the programs.
> GY>    2.   Compile a list of all FUNCTIONS and SUBROUTINES declared in
> GY>         the programs.
> 
> I did something similar once.  This type of program would
> compile all files, one by one, into a master text or random
> access file which could then be sorted by function, program,
> etc.
> 
> Since there are so many ways to do this, like reading in all
> the .BAS file names automatically and such improvements, I'll
> use abbreviated or pseudo code.

[pseudo-source code deleted]
> 
> Once you get all the DECLARE, SUB and FUNCTION lines in one
> place, along with the original files they came from, you can
> check, manipulate and cross reference just about any way you
> want.

This works great except one of the things we need to cross reference for is
FUNCTIONS and SUBs that are not declared.  SUBs are an easy addition to your
pseudo code, simply look for CALL, the only problem is functions.  We need
to make sure that we don't have any functions called that no longer exist.

Any ideas?  I've been told about a program called QBX.??? from Van Beurg, but
calling the main BBS has yielded nothing. :(  Neither has ARCHIE

Greg


.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.
.   TCS Consulting Services   P.O. Box 600008   St. Paul, MN  55106-0008    .
.   ..!srcsip!tcscs!zeta                 ..!src.honeywell.com!tcscs!zeta    .
.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.-=-.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads