Short Circuit Booleans?
I'm sure the answer is no, but I thought I'd ask.
Does the UI language perform short circuit boolean evaluations? Or does it fully evaluate all expressions even when unnecessary? ie, if one were to code something like: Result=( X || Text==Parent.Parent.Something ) Would the text compare be performed even if X is already set to True? (Making the text comparison unnecessary?) Or would it do the text compare anyway? |
And while I'm at it, do we have an XOR operator, or a logical Not?
So far, my attempts at anything like Test=( !X ) have not worked. I had to resort to Test=X ? false : true. |
I don't think anyone outside of SoE could tell you that unless they benchmarked a huge number of iterations of such. Though I sort of wonder why you care.
Secondly, I couldn't tell you if it's the case for your example, but often the UI evaluates things right to left, but your assumption in your example assumes it checks the left side of the || first instead. Thirdly, there are situations where you can and cannot have several evaluations on a single line. If you can get a multi-boolean evaluation to work there, good for you... but I never try to make it do complicated things because they just cause debugging headaches when it decides not to work. There's some sort of operator thread stickied someplace... if you haven't found it in there, it probably doesn't exist. Trying to use random ones from other languages is probably futile. The UI scripting language isn't really based on any standard as much as it borrows random things. |
Quote:
As to your first question, the answer is no, but that's because you have to pre-evaluate your expressions anyway, the example code you posted will not work. |
All times are GMT -5. The time now is 12:21 PM. |
vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI