#ARexx IF and THEN…
5 messages in this thread
I would like some help getting a ARexx program of mine to work. I need to be
able to do a IF/THEN statement that is something like this:
If X < 400 or Y < 900 then …
^^ This is what I have a problem trying to get to work since I don't
see anything like it in either the ADos ARexx book or the ARexx Cookbook.
If anyone can give me a idea I would be gratefull.
IF X<400 or Y<900 THEN …
Trying looking up "Logical Operators" in the index. You'll find references
to:
| – meaning 'or'
& – meaning 'and'
^ – meaning 'eor'
~ – meaning 'not'.
Thus, your coding will read:
IF X<400 | Y<900 THEN …
–Jim
Jim, thanks for your help. I couldn't even remember what subject to look up in
the book, I guess I won't forget they are Operators unless I stay up late again
and can't get my mind to work. :^)
Try using the vertical bar instead of the word "or"
If (X < 400 | Y < 900) then …
Mark Boyd InterNet: mboyd@dplanet.xbbs.com
Still Learnin' 🙂 Compuserve: 76744.644
>Try using the vertical bar instead of the word "or" > > If (X < 400 | Y <
900) then …
I knew that the word `or' couldn't be used I just placed it there to give you
guys the idea of what I wanted to do. I even had the script as you have it
before I asked here but my machine must haven't been hot because it wasn't
working but the next time I used the computer it worked fine.
Thanks…