Hi All. Thanks in advance for looking at this thread.
Have a program (BBS Door Game, actually) that CHAINS off to another .BAS file if a certain condition is met (if the program is run on the first of the month). This was required due to memory limitations on BC.EXE at compile time. The second BAS file is contained within the main BAS file as a MODULE (Load File... in the IDE).
Within the IDE, this method works:
IF firstofmonth, then CHAIN "MAINT.BAS"
Maint.BAS runs through some stuff, then contains:
RUN MC.EXE at the end to re-start the original EXE.
This works in the IDE without issue or error.
Upon compile time, BC compiles both, and LINK joins the two sources as a single EXE. Exactly what I'm looking for.
At runtime of the compiled program, a 'file not found' error is produced. I've recompiled with logging, and verified it's my chain command that is failing. Makes sense.
I found some posts that suggested removing the .BAS from the CHAIN command, gave that a whirl. Same. Tried with .EXE in the extension. Same. I don't believe I can CALL my module; I can only CALL SUB or CALL FUNCTION.
Looking at some other program's source code, I see where each individual file contained is different parts of the program; Main module in one .BAS file, SUBS in another .BAS file, Functions in another .BAS file. Then they get compiled together at compile time. Perhaps I'm just going about my CHAINing theory all wrong.
Any tips or ideas?
Thanks very much!
Bryan
Have a program (BBS Door Game, actually) that CHAINS off to another .BAS file if a certain condition is met (if the program is run on the first of the month). This was required due to memory limitations on BC.EXE at compile time. The second BAS file is contained within the main BAS file as a MODULE (Load File... in the IDE).
Within the IDE, this method works:
IF firstofmonth, then CHAIN "MAINT.BAS"
Maint.BAS runs through some stuff, then contains:
RUN MC.EXE at the end to re-start the original EXE.
This works in the IDE without issue or error.
Upon compile time, BC compiles both, and LINK joins the two sources as a single EXE. Exactly what I'm looking for.
At runtime of the compiled program, a 'file not found' error is produced. I've recompiled with logging, and verified it's my chain command that is failing. Makes sense.
I found some posts that suggested removing the .BAS from the CHAIN command, gave that a whirl. Same. Tried with .EXE in the extension. Same. I don't believe I can CALL my module; I can only CALL SUB or CALL FUNCTION.
Looking at some other program's source code, I see where each individual file contained is different parts of the program; Main module in one .BAS file, SUBS in another .BAS file, Functions in another .BAS file. Then they get compiled together at compile time. Perhaps I'm just going about my CHAINing theory all wrong.
Any tips or ideas?
Thanks very much!
Bryan