12-07-2005, 12:19 AM
I would like to see a function that automatically creates SUB and FUNCTION declarations. It wouldn't be hard to implement at all. Right now I have one that puts the declarations in a seperate file, then I just copy and paste them into the main code or simply include the header file:
I find it a pain to make a sub and then go back up to the top and create the declaration, and this program that I am working on right now has 78 subs without declarations.
Code:
OPEN "d:\contactii\inspiraion.bas" FOR INPUT AS #1
OPEN "d:\contactii\inspiraion.bi" FOR OUTPUT AS #2
DIM a as string
WHILE NOT EOF(1)
INPUT #1, a
IF LEFT$(TRIM$(a), 4) = "SUB " OR LEFT$(TRIM$(a), 9) = "FUNCTION " THEN PRINT #2, "DECLARE " + TRIM$(a)
WEND
CLOSE
sleep
I find it a pain to make a sub and then go back up to the top and create the declaration, and this program that I am working on right now has 78 subs without declarations.