Works
Code: Select all
rx "say ~(~0)"
Code: Select all
rx "say ~~0"
Definetly not a bug at all. Operators are made of 1 or 2 symbols so '|' and '||' are both valid operators with different meaning, first means 'or' second means 'concatenate' . '~' means 'not' but '~~' has no meaning assigned therefore throws up an errorpolluks wrote:Hi!
WorksDoes not workCode: Select all
rx "say ~(~0)"
30 years hiddenCode: Select all
rx "say ~~0"
Actually "!!value" does work in C and is commonly used to normalize arbitrary zero/non-zero boolean values into being either 0 or 1 for false and true respectively.broadblues wrote: Fairly sure the same would work in C (!! expression) would give an error. !(! expression) would work.
Interesting - what does it work as? Because my recollection from when I used Rexx on IBM mainframes was that the logical NOT operator isn't a tilde at all, but a proper "not" sign ("¬") or alternatively a backslash.thomasrapp wrote:~~ also works in Rexx on IBM mainframe.
nbache wrote:thomasrapp wrote:my recollection from when I used Rexx on IBM mainframes was that the logical NOT operator isn't a tilde at all, but a proper "not" sign ("¬")
Ah, right. Yes, I also remember the caret being an alternative with some charsets.thomasrapp wrote:Sorry, I wasn't clear. Of course I didn't try ~~ but the equivalent of "NOT NOT" which is ^^ using the German code page.
Code: Select all
say --1
say ++1