Page 1 of 1

GOOD IDEA FOR LARGE PROGRAMS

Posted: Sun Nov 13, 2011 6:36 am
by TRANERAECK
I have an idea for large programs. You could DECLARE your subs in the main program and then separatley compile two programs and also use GLOBAL VARIABLES with COMMON SHARED then link the separate object files with the linker. I found this code on a website for vbdos.

Code: Select all

' Released into the PD Dec 19, 1992 by
' JackMack Consulting & Development
' "Specializing in custom DOS-BASED GUI applications and on-line
'  documentation."

DEFINT A-Z

PRINT "Huge LINK Interception!"


RespFile$ = RIGHT$(COMMAND$, LEN(COMMAND$) - 1)

OPEN RespFile$ FOR INPUT AS #1
OPEN "!" + RespFile$ FOR OUTPUT AS #2

DO UNTIL EOF(1)
        LINE INPUT #1, buffer$
        a = INSTR(buffer$, "/Se:")
        IF a THEN
                MID$(buffer$, a) = "/SE:500" 'Or whatever you want
        END IF
        PRINT #2, buffer$
LOOP

CLOSE #1, #2
SHELL "LINC.EXE @!" + RespFile$
KILL "!" + RespFile$
This is supposed to fix the linker from too many segments.
If you test the modules you can run another sub from another module
that is a sub module (say module 2) in main module by declaring in
module 2. I think this is for too many subs or segments.
Hope this helps.
This should help make large files and such for anyone. :!:
Have fun programming.