Not operator
Hi there,
i've upgraded to version 2.14.1 and noticed that the not (!) operator is no longer working in if statements.
I always get "Expected expression value" errors. Is it just a config thing or has the parser changed?
Thanks, Tim
The not operator should still be working. Can you give me an example of where it doesn't work?
Regards,
Andreas
Regards,
Andreas
A simple example is the following:
I can rewrite the if statement to get it working:
Regards,
Tim
class Test{ bool isTrue() { return true; } void test() { if ( !isTrue() ) print("false"); else print("true"); }}Test t;
I can rewrite the if statement to get it working:
class Test{ bool isTrue() { return true; } void test() { if ( isTrue() != true ) print("false"); else print("true"); }}Test t;
Regards,
Tim
Yeah that works too, but !isTrue() worked at least in version 2.13.1.
I don't know why there should be extra parenthesis necessary now.
Regards,
Tim
I don't know why there should be extra parenthesis necessary now.
Regards,
Tim
I am not sure why. It is perhaps some ANSI requirement. BTW you don't specify which tool you are talking about (version 2.13.1 of what?) and the language you are using. Probably C++ ?
Quote:Original post by VinzO
BTW you don't specify which tool you are talking about (version 2.13.1 of what?) and the language you are using. Probably C++ ?
Give that this is the AngelCode forum, you can assume the language is AngelScript.
Sure, sorry. I got here by clicking on
"recent threads" on the homepage. Haven't seen the forum title.
"recent threads" on the homepage. Haven't seen the forum title.
This must be a bug that made it into the latest release. I'll have fixed a.s.a.p.
Thanks for letting me know.
Regards,
Andreas
Thanks for letting me know.
Regards,
Andreas
This bug was caused by the introduction of the !is operator. The tokenizer is incorrectly parsing the "!" "isTrue" tokens as "!is" "True", which causes the error you're seeing.
I'll have a fix for it soon.
I'll have a fix for it soon.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement