OR, |

New releases and general discussions.

Post » Sat Mar 20, 2010 3:31 am

Has it been fixed yet? Previously, when you created something like value is equal to 0 or 1 , if the value was 1 it did nothing. I currently need it to use arbitrary amount of ORs in a variable used together with stringed tokens and loopindex.
B
2
S
2
G
4
Posts: 259
Reputation: 1,968

Post » Sat Mar 20, 2010 7:51 am

Is it broken? From your description you are trying to do something like this:
[code:2svbv8u7]+ Text: Value 'var' Equal to 0 or 1[/code:2svbv8u7]

When read it makes sense, but in construct and almost every programming language out there it is read like this:
The expression "0 or 1" will be computed as "1". So the event will always be read as:
[code:2svbv8u7]+ Text: Value 'var' Equal to 1[/code:2svbv8u7]
Which is not the desired condition.

Here is a correct way to use "or" with the System -> Evaluate condition:
[code:2svbv8u7]+ System: (Text.Value('var')=0) or (Text.Value('var')=1)[/code:2svbv8u7]

If I misunderstood, please clarify.
B
79
S
24
G
54
Posts: 4,749
Reputation: 40,761

Post » Sat Mar 20, 2010 8:38 am

Wanted to edit post earlier but got locked out of account. I sent for PW request but PW is still the original that I found luckly sitting in the email? Anyway, I got it to work with the evaluate conditions which is all I needed didn't work on compare but doesn't matter. In the past I wanted to use or for all checking all the key presses I wanted and not being able to put in the value as is never occurred to me then. And it was always computed as 0 in that example for me - like it got the first value and thats it. Anyway, everything is awesome now - I'm using it to skip looping thru the most of the loopindex of a nested loop so that it only gets the two range of values I wanted and skips the useless values. Thanks.
B
2
S
2
G
4
Posts: 259
Reputation: 1,968


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 1 guest