Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Mulitple files

Author
Message
Tenbar
14
Years of Service
User Offline
Joined: 31st Mar 2010
Location:
Posted: 11th Apr 2010 21:12
I am trying to make a game in DBPro and run into the problem where the code is REALLY long. Is there any way to break all the code into several files then include them where needed in a main file.

Like have one file for the main loop of a game then another file that holds all the functions of the game.

Thanks for any help
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 12th Apr 2010 06:48 Edited at: 12th Apr 2010 06:48
Absolutely. You have your DBPRO file and your DBA file. You can safely cut out any subroutines or functions and save them in a seperate DBA file in the same folder. All you have to do is add #INCLUDE "whatever.dba" to the top of your main project, or use the IDE to add the other source file, and it will compile as though any included source files were just more lines at the end of the main one.

Tenbar
14
Years of Service
User Offline
Joined: 31st Mar 2010
Location:
Posted: 12th Apr 2010 06:57
nice.. thank you

Login to post a reply

Server time is: 2024-11-23 16:59:58
Your offset time is: 2024-11-23 16:59:58