TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Andrea Zaccagnini
from: Murray Lesser
date: 1995-10-25 07:35:02
subject: Rexx

Excerpted from message dated 10-22-95, Andrea Zaccagnini to All:

AZ>I have a stupid REXX problem, and no text I've read can help me. This
  >is a wrong REXX token:

AZ>If ((a="aa") | (a="bb")) then
  >...

AZ>but its meaning is quite obvious in other programming languages.
  >What's the right corresponding token?

Andrea--

    If your construct is really on two lines, as shown above, you need a
comma (continuation symbol) between the "then" at the end of one line
and the statement to be executed that appears on the second line.  In
REXX, unlike some other languages, a line-end is an automatic statement
end if there is no continuation symbol.  If the complete statement is on
one line in your original, I don't see anything wrong with it although
you have included some unnecessary parentheses (poor practice in an
interpreted language).  Here are a couple of lines from one of my REXX
programs that work fine:

    If (left(alarm,2) > 24 | right(alarm,2) > 59) then signal oops
    If (left(alarm,2) = 24 & right(alarm,2) \= 0) then signal oops

    If this doesn't help, can you post a little more of your program so
we can see the context?

          --Murray

___
 * MR/2 2.25 #120 * If you are not confused, you don't know the situation
                  
---
* Origin: 2" x 4" bbs - a basic board - (914) 271-9407 (1:2625/108)
SEEN-BY: 270/101 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407
SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809
@PATH: 2625/108 1 2606/583 2605/606 270/101 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.