GOOD IDEA FOR LARGE PROGRAMS

Discuss whatever you want here--both QB and non-QB related. Anything from the DEF INT command to the meaning of life!

Moderators: Pete, Mods

TRANERAECK
Coder
Posts: 29
Joined: Thu Mar 24, 2011 3:08 am

GOOD IDEA FOR LARGE PROGRAMS

Postby TRANERAECK » Sun Nov 13, 2011 6:36 am

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.

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests