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 / Using a number DB files

Author
Message
Colin Hart
21
Years of Service
User Offline
Joined: 28th Apr 2003
Location: United Kingdom
Posted: 11th Jun 2005 21:27
Afternoon everyone.

I've been working on a 2d game. Its got to the stage where I have a large amount of code. When I program in "C" I have the option to use many source files and use the command "#include" is there a similar command in DB? if so how does it work? are there any protocals (rules) in using it?

Thank you for reading.

Colin.
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 11th Jun 2005 22:13
Colin Hart,

Firstly, always remember to check the help files or search the forums before posting. While looking in the 'commands/basic' section of the DarkBasic help files, you would have stumbled upon the #INCLUDE command. Its syntax is #INCLUDE "Filename String".

I believe that you can only include .dba files, which is the normal output from DarkEdit or the original DarkBasic Editor. To use the included file, any code within it must be placed in a function and then called. The same stipulations apply to using an include file as applied to using functions.


+NanoBrain+
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 12th Jun 2005 00:39
this is a great example of a healthy forum post, sure the user asked politely and didnt look at the help files but thats granted when you first start out sometimes. the replier improved the users chances of solving other problems with the advice of the helpfiles and the specifics about usage was also given.

kudos guys

If no-one gives your an answer to a question you have asked, consider:- Is your question clear.- Did you ask nicely.- Are you showing any effort to solve the problem yourself 

Login to post a reply

Server time is: 2024-09-23 21:22:32
Your offset time is: 2024-09-23 21:22:32