true, but I don't see why the #include command doesn't insert the code where it is included rather than at the end in the order you include.
Order goes
Main -> DBPRO Include -> #Include
.. Functions it doesn't matter where they are same with constants as both are accessed by addres; but other things aren't.
Type HelloType
Name As String
Colour As String
Animal As String
EndType
Global Hello As HelloType
Start:
CLS
Input "What is your name? ", Hello.Name
Input "What is your favourite colour? ", Hello.Colour
Input "What is your favourite animal? ", Hello.Animal
Print "Hello " + Hello.Name
Print "I never knew you were a " + Hello.Colour + " " + Hello.Animal
Wait 2000
Repeat
CLS
If SpaceKey() Then GoTo Start
Text 0, 0, "Any Key To Exit. Space To Try Again."
Until Quit = 1
End
If we take that an split it up like:
Type.dba
Type HelloType
Name As String
Colour As String
Animal As String
EndType
Program.dba
Start:
CLS
Input "What is your name? ", Hello.Name
Input "What is your favourite colour? ", Hello.Colour
Input "What is your favourite animal? ", Hello.Animal
Print "Hello " + Hello.Name
Print "I never knew you were a " + Hello.Colour + " " + Hello.Animal
Wait 2000
End.dba
Repeat
CLS
If SpaceKey() Then GoTo Start
Text 0, 0, "Any Key To Exit. Space To Try Again."
Until Quit = 1
End
So to put it back together would be like just altering the main.
Main.dba
#Include "Type.dba"
Global Hello As HelloType
#Include "Program.dba"
#Include "End.dba"
If you were using Blitz3D, or PureBASIC then that WOULD work exactly like that. Just DB/P that doesn't which is annoying.