View previous topic :: View next topic
|
Author |
Message |
harisukumaran
New User
Joined: 14 Jun 2005 Posts: 75
|
|
|
|
Can 'not equals' be represented by /= in Rexx ?
The manual only mentions \=
However I accidentally coded /= instead and it seems to work the same as \=
But if I use / by itself for negating a condition,
I get an error
Could a rexx guru please explain to me what might be going on ? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
the \= is NOT a logical negation of the = operator is an operator itself like the ** ( power ) operator.
that' s all
the char to be used for the NOT logical operator is a bit murky ...
what You see depends on the the terminal code page used
and the behaviour could be different on the pc
see for example ( open object rexx on a mac book pro )
Code: |
#!/usr/bin/rexx
a = 0
b = 1
if a then ,
say " a is true"
if b then ,
say " b is true"
if a \= b then ,
say "a \= b"
if a = \b then ,
say "a = \b"
|
and the result is
Code: |
b is true
a \= b
a = \b
|
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
as I said before all depends on Your emulator configuration
the same problem exists for
¬ VS ˆ
{}[]
| VS ! |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
TSO/E REXX Reference shows ¬=, /= and \= as not equal. |
|
Back to top |
|
|
harisukumaran
New User
Joined: 14 Jun 2005 Posts: 75
|
|
|
|
Thank you so much |
|
Back to top |
|
|
|