It's important to note, however, that using include files is no different, functionally, to putting those functions in your main source file and calling them from there. The only practical difference is that you can use the same include files in multiple projects - kind of like a plugin. Even that, however, is functionally identical to copypasting the relevant functions from one project to another, and keeping everything in main source files instead of includes. When the compiler starts its run on the code to create an executable, it effectively appends each include file onto the end of your main source file to create one big, long concatenated source from which to compile, so all of the includes get compiled along with the primary source. This means that the separation between the main source and each include is therefore a logical break, not a physical one. It also means that once you compile your project,
making changes to the include file will not have any effect on your program unless you compile it again.
Perhaps I'm misunderstanding, but I don't think this suits your purposes. Weren't you asking in your original post about scripting and dynamic code? Or am I way off base and you just want to know how to split your code up into logical pieces (cause that's what you use includes for)?
I thought you wanted to put actual DBPro code into a text file, and have it executed by the main source file dynamically. When you compile your program, don't you want to retain the ability to adjust those text files and have the same executable handle the updated content of those text files?
If that is the case, it's done by coding an interpreter into your main source file. You can also use LUA scripting quite easily if you use the appropriate LUA plugin (and, of course, if you know how to script in the LUA format). The alternative, one that I've taken to, is creating your own scripting language and interpreting it yourself in your main project. I use a custom-built scripting language technique for all my dynamic programming needs, and I tweak it on a project-by-project basis so that it is specifically tailored for its unique purpose. I can show you how to do this if I am interpreting your question correctly.
EDIT: Spewing. I typed all of that and then noticed this post from Tim that I'd completely overlooked:
Quote: "Ok, so... Right now I got a text game whit a fighting system, and that is all one long file. I want to splitt it up to several (darkbasic) files so that it is easyer to manage. I need help whit how to do that."
I'm posting this anyway, cause I typed it and I can't bring myself to delete it