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.

DarkBASIC Professional Discussion / Help with #include file statement

Author
Message
Firesea
23
Years of Service
User Offline
Joined: 7th Apr 2003
Location:
Posted: 30th May 2003 21:56
I thought I understood the #include statement but..

My code is getting a bit long, took the menu portion and moved to another project. Typed #include menuportion.dba, compiled program - everything worked great.

Renamed main program project and source. Now get various errors in include file that don't make sense. Tried resaving include file with new name - no help.

I understood that include files were "added" on the end of program at compile time..

Can I call subroutines, functions between main program and include files?


Firesea
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 30th May 2003 22:06
Put the #include at the end of the program, or include a goto in the include so that your main program doesn't trip over a function call. In DBPro the #included source is placed where-ever the #include command is.

Another option is to use the Files menu to 'browse' and select your include, you can then access it directly from the same project and after you first access it the first time that source code selection box at the top of the editor (that you never did get working and thought it was bugged) starts to work.

Pneumatic Dryll
Firesea
23
Years of Service
User Offline
Joined: 7th Apr 2003
Location:
Posted: 30th May 2003 22:19
Well Golly Jeepers it works!!

Thank you very much - it gets old looking for something quick in 1000's of lines of code. Now I can get organized!

Firesea

Login to post a reply

Server time is: 2026-07-11 11:42:13
Your offset time is: 2026-07-11 11:42:13