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 / What can I #include from another source file?

Author
Message
Duffer
22
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 19th Feb 2003 20:25
I know I can #include in functions. What about user defined variables (types)? What about arrays?
Duffer
22
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 19th Feb 2003 20:54
anyone?

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 19th Feb 2003 21:48
You can have anything inside an include file.

functions, subroutines, variables, types, arrays (although not correctly initialised just yet).
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 20th Feb 2003 00:31
i remember being told that we can still only use functions in the include files - but that cause of them being global it doesn't matter

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
Duffer
22
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 20th Feb 2003 01:42
Thanks Guys,

Have now tried all and everything but arrays work faultlessly. My previous (I am ignorant) query is now answered (do too many lines of User Defined Variables or Functions in code and get an error). All I need to do is take a more modular approach and squirrel away all my useful Functions and Types in other .dba files and then include in my project later on.... Doh!

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th Feb 2003 14:32
You can get arrays to work if you include an initialisation function that you must call from your main code.



Thats the work-around I'm using at the moment until patch 5 fixes it (already reported to Lee).
Duffer
22
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 20th Feb 2003 20:46
Thanks again.

Login to post a reply

Server time is: 2025-05-18 15:12:27
Your offset time is: 2025-05-18 15:12:27