You may have as many operators as you desire in the EVAL statement.  That
was the whole point of adding it to RPG.  With EVAL, we no longer have to
code:
VALUE1   ADD    VALUE2      RESULT
         SUB    VALUE3      RESULT
         MULT   VALUE4      RESULT
         ADD    VALUE5      RESULT

Instead, we can code:
EVAL RESULT = (((VALUE1 + VALUE2) - VALUE3) *
              VALUE4) + VALUE5

However, if the result of the calculation is a larger number than may be
placed in RESULT, the program will crash with a numeric overflow error.

Donald R. Fisher, III
Project Manager
The Roomstore Furniture Company
(804) 784-7600 extension 2124
DFisher@roomstoreeast.com

<clip>
Just for curiosity, but is this a valid statement?

c                   eval      amount2 = amount1 +
c                             + 500.00
<clip>


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.