-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add boolean "not" and a "not equal" operator. #29
Comments
To a certain extent, this is a "todo" for myself. I would like to implement this. |
The minus sign already works as a boolean negation operator, so you can do something like:
|
Ugh. I'm not sure I like that solution, given the type-agnostic nature of kOS script. The idea of overloading 'minus' to sometimes mean "not" depending on if the operand is boolean or not is a bit 'iffy', since inversion in boolean symbols isn't represented with a minus sign. |
pull request #46 now addresses this without the list index fix attached to it. |
Closing as this was fixed in pull request #46. |
(This is a repeat of an issue that was just raised on the old KOS project just before erendrake and marionoapp merged their work into this project.)
1: Add a boolean unary negation operator, as in:
or
2: Also the "not equal" operator seems to be missing from the otherwise complete list of comparators:
Implement either like this:
or like this
The text was updated successfully, but these errors were encountered: