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 / Really strange problem with functions - Help needed!

Author
Message
Broken_Code
15
Years of Service
User Offline
Joined: 20th Aug 2010
Location: Bremen, Germany
Posted: 22nd Mar 2013 14:16 Edited at: 22nd Mar 2013 14:19
Hello all!

I couldn't really describe my problem properly in the title, but I'll have a go here:

Ok, I have some functions. These functions work. The problem is that this:

works but this:

dosen't. Now that I know what the problem is a workaround is easy, but I have no idea what could cause this problem?

Has anybody seen this before? Does anyone know what the problem is?

Thanks,
Bruce

[EDIT]
This doesn't work either:

However that does work if the two functions inside that function call are first saved to variables.
ShellfishGames
13
Years of Service
User Offline
Joined: 6th Feb 2013
Location:
Posted: 22nd Mar 2013 15:26
I experienced similar problems on several occasions, on different PCs and as far as I remember with several compiler versions.
There seem to be rare parsing problems regarding nested parantheses, but I don't really know more. So I guess you'll just have to accept the workaround, that is unless somebody on this forum knows what exactly is going on.

Broken_Code
15
Years of Service
User Offline
Joined: 20th Aug 2010
Location: Bremen, Germany
Posted: 22nd Mar 2013 19:29
That makes sense but I have much longer lines of nested parantheses elsewhere in the code with no problems, so it if that is the problem then there would be some inconsistency with this bug? I've got no problem using the workaround, in fact it makes the code clearer in most cases, but I would like to be able to see when this problem would occur. Any other ideas?

@Shellfish:
Flow Motion looks really good by the way, keep it up!

Thanks,
Bruce
ShellfishGames
13
Years of Service
User Offline
Joined: 6th Feb 2013
Location:
Posted: 22nd Mar 2013 19:58
Quote: "That makes sense but I have much longer lines of nested parantheses elsewhere in the code with no problems, so it if that is the problem then there would be some inconsistency with this bug?"


Absolutely. I'm using DBP for about 10 years now and encountered this bug maybe 5-10 times during that time. I haven't even bothered trying to find out what exactly causes the problem since the workaround is so simple.

Quote: "Flow Motion looks really good by the way, keep it up!"


Thank you.

GIDustin
18
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 22nd Mar 2013 20:12
Does the compiler error out, or does it compile fine, but not run properly?

Login to post a reply

Server time is: 2026-07-07 04:10:08
Your offset time is: 2026-07-07 04:10:08