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 / #Include command - How do I use this properly?

Author
Message
Agent Dink
22
Years of Service
User Offline
Joined: 30th Mar 2004
Location:
Posted: 1st May 2005 01:06
Well, just what the topic says. How can I use included files properly? Can I code my player in an included file and have it called in my main project, so as to allow the code to be neater and cleaner, or is include for somthing else?

Thanks in advance

www.badpicsofmatt.tk
www.silver-dawn.net
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 1st May 2005 01:36
Yes, you can include code into your main code but don't use the #include command. include it from the project settings in the IDE


Coder formerly known as Scraggle
Agent Dink
22
Years of Service
User Offline
Joined: 30th Mar 2004
Location:
Posted: 1st May 2005 04:04
OK, thanks for that! Also, would I be able to code say... my player in an included file and it would work just like I coded it in the main project file?

www.badpicsofmatt.tk
www.silver-dawn.net
Ace Of Spades
21
Years of Service
User Offline
Joined: 6th Mar 2005
Location: Across the ocean
Posted: 1st May 2005 04:06
each included file is tacked on to the end of the main file before compiling

Digitalmodr
Coder_David
[Apolloed ]
JerBil
22
Years of Service
User Offline
Joined: 8th May 2004
Location: Somewhere along the Z axis...
Posted: 1st May 2005 05:05
Don't forget to back up your work frequently when working with extra files. At least in the old ide, a syntax error could
wipe out all your code.

-JerBil

Ad Astra Per Asper
Agent Dink
22
Years of Service
User Offline
Joined: 30th Mar 2004
Location:
Posted: 1st May 2005 05:32
Umm wow, ok thanks for all the info guys, including things should make stuff alot easier as long as I dont run into thatproblem JerBil mentioned.

www.badpicsofmatt.tk
www.silver-dawn.net
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 1st May 2005 07:11
An easy way to avoid that problem is not to use the standard IDE. I personally recommend RobK's BlueIDE which has the feature to automatically save your work every X minutes or each to you complile


Coder formerly known as Scraggle
dj blackdragon3710
21
Years of Service
User Offline
Joined: 5th Nov 2004
Location: In LaLa land
Posted: 1st May 2005 07:42
Quote: "At least in the old ide, a syntax error could
wipe out all your code.
"

Had that happen many, many times. Now I use BlueIDE. Much, much better.

It has been said that the body is a slave to the mind. Only the mind knows no freedom.

Login to post a reply

Server time is: 2026-06-26 03:09:01
Your offset time is: 2026-06-26 03:09:01