Modules are the BAS files or programs. Actually they are called programs when they are compiled. SUB's are subordinate modules. Both can do the same things usually.
You can CHAIN any code to another module. You could even put several SUBs into a separate module. You can put a menu in one and game code into several modules. You could also LINK the modules without CHAIN. That requires command line compiling. Pete does that often.
You will have to pass some variables eventually. I prefer a data file to using COMMON SHARED as I make stand alone EXE's. Each module can change the data before it goes back to a main module. You don't have to change Screen settings either.
You should use a Main module to call each CHAIN'ed module and return with another chain back to that Main module. If you don't, your last module must exit the routine.
Ted
This message has been edited by burger2227 on Feb 12, 2009 5:46 PM
|
|