CompuServe Thread

#ARexx IF and THEN…

5 messages in this thread
#47289From: Anthony RamirezJun 19, 1995 9:17 PM
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.
#47299From: Jim ButterfieldJun 20, 1995 11:03 AM
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
#47309From: Anthony RamirezJun 20, 1995 9:47 PM
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. :^)
#47312From: Mark BoydJun 21, 1995 2:37 AM
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
#47353From: Anthony RamirezJun 24, 1995 7:29 AM
>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…