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 or IDE include, Has this stopped working ? DBP V1.6b

Author
Message
TinTin
20
Years of Service
User Offline
Joined: 16th May 2006
Location: BORG Drone Ship - Being Assimilated near Roda Beta (28)
Posted: 11th Jul 2007 12:13 Edited at: 13th Jul 2007 10:52
Hi Guys
I was working with one of my old applications and decided to plug in some of its files into my current application using the IDE include files panel. During compile I now keep getting a compile early exit error You have hit a FUNCTION declaration mid program. Now, if i copy and paste all the code into one file the application compiles and runs. I've even tried using the #include but this still gives the error. The original code used to work (I've got the exe) but even it wont compile.

Here is some sample code....

Main.dba


Test.dba


I've tried this with both DBP IDE and Codesurge with similar results from both, is it the compiler ???

Cyberspace was becoming overcrowded and slummy so I decided to move. These nice chaps gave me a lift.
Math89
22
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: UK
Posted: 11th Jul 2007 12:16
You need to end the program after the Wait Key because the program reach the function declaration.
Pricey
23
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 11th Jul 2007 12:17 Edited at: 11th Jul 2007 12:17
place an END after that 'WAIT KEY'

basically, all you're doing is appending 'test.dba' onto the end of 'main.dba'

so after the user presses a key at the WAIT KEY command
it moves on, and the program encounters the function declaration
causing the crash out

{EDIT} yeah, we posted at the same time =P

TinTin
20
Years of Service
User Offline
Joined: 16th May 2006
Location: BORG Drone Ship - Being Assimilated near Roda Beta (28)
Posted: 13th Jul 2007 10:52
Ooops guys, I forgot that 'End' in the example, it's in the actual program so thats not the answer

I'm also getting slot allocation errors if I remove any IDE included files and DBP has overwriten some of my IDE included files with other files that are IDE included when I save all.

Cyberspace was becoming overcrowded and slummy so I decided to move. These nice chaps gave me a lift.
hyrichter
22
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 13th Jul 2007 16:09
That's why you should be using CodeSurge.

Good performance is better than a good excuse.
CodeSurge -- DBP Editor for serious programmers.
x1b
21
Years of Service
User Offline
Joined: 19th Sep 2004
Location:
Posted: 13th Jul 2007 19:57
Better yet? Save your self the trial & error time and use Synergy Editor.

TinTin
20
Years of Service
User Offline
Joined: 16th May 2006
Location: BORG Drone Ship - Being Assimilated near Roda Beta (28)
Posted: 19th Jul 2007 17:58
Don't you just love the useless info some people give, I bought DBP, I wanna use DBP, my question was aboud DBP. no where, I said 'NO WHERE' did i mention in my post, Codesurge or Synergy. I agree these are superb alternatives to the original IDE but it's the original I was asking about. (It's been a hard day)

Cyberspace was becoming overcrowded and slummy so I decided to move. These nice chaps gave me a lift.
Balid
22
Years of Service
User Offline
Joined: 21st Nov 2003
Location: MI, USA
Posted: 20th Jul 2007 14:24 Edited at: 20th Jul 2007 14:25
Try manually editing the dbpro file to have your includes in the same order as you had them with #include. They are probably being added out of order.

Quote: "no where, I said 'NO WHERE' did i mention in my post, Codesurge or Synergy."

ummm, please reread your first post

I believe the other IDE's are being mentioned as they allow you to change the include order fairly easily (so does BlueIDE 2 , but it is still currently a little slow at times). Good luck the original IDE.

Regards,

vibe runner
19
Years of Service
User Offline
Joined: 7th Aug 2006
Location: The Future
Posted: 20th Jul 2007 14:37 Edited at: 21st Jul 2007 11:21
My advice is not to have multiple project-based includes if using the original IDE. Use the #INCLUDE command instead.

I tried Code Surge but it was so annoying I had to revert. Two major complaints with it: no auto-display of parameters at the bottom (like the original IDE does) and if you F1 a help window you can't ESC to close it, but have to move your hand to the mouse to close it. Those two things alone were enough to make me uninstall it. Wonder how Blue works? Any better?
Lost in Thought
22
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 20th Jul 2007 15:02 Edited at: 20th Jul 2007 15:10
Both work fine here in any case. Make sure you have installed the 2 IDE updates (install both and in order) found here:

http://darkbasicpro.thegamecreators.com/?f=ide

on this site as well as the unofficial one I mirrored here:

http://forum.thegamecreators.com/?m=forum_view&t=64322&b=1

[edit] Project and source files used to test included.

John Y
Synergy Editor Developer
23
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 20th Jul 2007 15:25 Edited at: 20th Jul 2007 15:26
Make sure you download Synergy Editor

Quote: "no auto-display of parameters at the bottom"


Yes it does, and it gives you tooltip help, as well as Go To Definition on functions, labels, types and arrays

Quote: "if you F1 a help window you can't ESC to close it"


It does now, cheers for the suggestion

vibe runner
19
Years of Service
User Offline
Joined: 7th Aug 2006
Location: The Future
Posted: 20th Jul 2007 15:32
John Y - I disliked the tooltip (I was very happy when it was given the option of removal). My version of S-IDE didn't display at the bottom, so very glad it does. With ESC to close the help window, you're making me a very, very happy coder.

I'll get S-IDE in the next release! Thanks!
John Y
Synergy Editor Developer
23
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 20th Jul 2007 15:38
Email me and I can send you it right now.

TinTin
20
Years of Service
User Offline
Joined: 16th May 2006
Location: BORG Drone Ship - Being Assimilated near Roda Beta (28)
Posted: 20th Jul 2007 16:47 Edited at: 20th Jul 2007 16:49
Opp's forgot about codesurge

I think it's the compiler thats got the bug as both codesurge ad DBP IDE have the same problem.

I've currently copied and pasted the include files into my main program, makes for messy reading, and the project compiles ok. So I know the code is fine. maybee I should stick this in the Bug forum.

P.S. I like codesuge it just looks the business, almost like a Visual Dev application.

Thanx for all the Help and Advice so far guys it's most appreciated.

Also... Anyone know whats happening to the updated help files, I'm getting so pissed off with missing help or unaccurate help for some of the commands.

Cyberspace was becoming overcrowded and slummy so I decided to move. These nice chaps gave me a lift.
vibe runner
19
Years of Service
User Offline
Joined: 7th Aug 2006
Location: The Future
Posted: 20th Jul 2007 18:30
From my quick tests with Synergy I like it, I like it a lot. This is the first time the "first impression" of a non-standard IDE has met my requirements and expectations. So far, so good!

Login to post a reply

Server time is: 2026-06-26 05:07:18
Your offset time is: 2026-06-26 05:07:18