IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Rexx not equals operator


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
harisukumaran

New User


Joined: 14 Jun 2005
Posts: 66

PostPosted: Sat Sep 20, 2014 2:57 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10766
Location: italy

PostPosted: Sat Sep 20, 2014 3:28 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10766
Location: italy

PostPosted: Sat Sep 20, 2014 10:08 am
Reply with quote

as I said before all depends on Your emulator configuration

the same problem exists for
¬ VS ˆ

{}[]

| VS !
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 882
Location: The Universe

PostPosted: Sat Sep 20, 2014 10:46 am
Reply with quote

TSO/E REXX Reference shows ¬=, /= and \= as not equal.
Back to top
View user's profile Send private message
harisukumaran

New User


Joined: 14 Jun 2005
Posts: 66

PostPosted: Sat Sep 20, 2014 5:39 pm
Reply with quote

Thank you so much
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts REXX allocated datasets in JCL CLIST & REXX 9
No new posts getting RC=3650 when invoking REXX wi... CLIST & REXX 7
This topic is locked: you cannot edit posts or make replies. A Rexx who changes date into a JCL?Po... CLIST & REXX 9
No new posts clist to rexx converter CLIST & REXX 2
No new posts How to replace a string dynamically i... CLIST & REXX 16
Search our Forums:

Back to Top