HP3000-L Archives

May 1998, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Date:
Mon, 4 May 1998 12:20:41 -0400
Content-Type:
text/plain
Parts/Attachments:
Beat (42 lines)
> Ok, beat me if you must, but I need to know this and I don't have a
> manual.  RPG/3000 has verbs to do comparisons.  They are IFEQ, IFLT,
> IFGT, IFLE AND IFGE, and IFNE.  RPG/400 on our AS/400 also has the
> verbs ANDEQ, ANDNE, etc. as well as OREQ, ORGT, etc., you get the
> idea.  Does HP support these AND.. and OR.. operators as well, or is it
> implemented in another way to do an
>
>                  IF A = B   and   C = D
> situation.

AFIK, RPG/3000 doesn't have the AND.. and OR.. operators.

The AND can be implemented with to IF statements:

            A    IFEQ B
            C    IFEQ D
                 .
                 .
                 .
                 END
                 END

The OR would have to use indicators. If you don't want to use
the indicator for a large block of code, you could fake it out
with an IF statement:
                           >  <  =
                           -------
            A    COMP B         10
     N10    C    COMP D         10
      10    1    IFEQ 1
                 .
                 .
                 .
                 END

The IF block will only execute if IN10 is on, and because the
condition is always true, it will always execute if IN10 is on.

---
Steve Fulton
The NPD Group Canada, Inc.

ATOM RSS1 RSS2