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.

Newcomers DBPro Corner / Complex boolean expression

Author
Message
DynamicLink
11
Years of Service
User Offline
Joined: 26th May 2013
Location:
Posted: 26th May 2013 22:14
Can anybody tell me please what is wrong with this expression?
WHILE MouseClick() != 1 AND (xm < x1dr OR xm > x2dr OR ym < y1dr OR ym > y2dr)
ENDWHILE

The error I get is:
Could not determine parameter type of '() !' at line 32.

I couldn't find anything related to complex expressions so far.
DynamicLink
11
Years of Service
User Offline
Joined: 26th May 2013
Location:
Posted: 27th May 2013 08:42
Never mind...i was a dumbass...being used to C++, i put != instead of <>
Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 27th May 2013 21:35
Hi DynamicLink. I think the problem is that you are useing != for does not equal, but in DBP, does not equal is <>. Therefore you code should look something like this.

Hope that helps.

DynamicLink
11
Years of Service
User Offline
Joined: 26th May 2013
Location:
Posted: 30th May 2013 20:55
another question: when i write something like NOT(bool1 AND bool2 AND ... AND booln) it says "variable 'NOT' does not exist in program". how can i make complex boolean expressions with not?
Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 31st May 2013 00:59 Edited at: 31st May 2013 01:00
Basically I think the issue is that you need a space between the not and the brackets. So for example, this works:

and this doesn't:

I don't know for sure but I think the issue is that if you put the bracket next to the not, it looks to the compiler like an array and thus is reports that not is not a variable in the program. Hope that helps.

Login to post a reply

Server time is: 2024-11-23 14:51:30
Your offset time is: 2024-11-23 14:51:30