× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Operation codes from the manual and the results returned

* The multiplication operation is used to multiply two numeric values.

/ The division operation is used to divide two numeric values.

** The exponentiation operation is used to raise a number to the power of
another. For example, the value of 2**3 is 8.

= The equality operation returns '1' if the two operands are equal, and '0'
if not.

<> The inequality operation returns '0' if the two operands are equal, and
'1' if not.

The greater than operation returns '1' if the first operand is greater
than the second.

= The greater than or equal operation returns '1' if the first operand is
greater or equal to the second.

< The less than operation returns '1' if the first operand is less than the
second.

<= The less than or equal operation returns '1' if the first operand is less
or equal to the second.

AND
The logical and operation returns '1' if both operands have the value of
indicator '1'.

OR
The logical or operation returns '1' if either operand has the value of
indicator '1'.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Booth Martin
Sent: Thursday, July 29, 2010 8:07 AM
To: RPG programming on the IBM i / System i
Subject: Re: What is the ** in an eval for?

I believe you but I haven't been able to find any reference to ** in the
RPGLE manual for V5R4.



On 7/28/2010 10:13 PM, Dennis Lovelady wrote:
I believe that's "raised to the power of"

So, result = 2 + (3 * 3 * 3 * 3)

The ILE RPG reference manual has a good discussion on operators. I'm just
sayin'...

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"I'm one of those mayors whose management style is to allow free and
unlimited debate up to a point."
-- Washington, D.C. mayor Marion Barry

C eval result = 2 + (3 **4)

what is the value of result? (I have never seen ** in an eval
statement
before and can't find it mentioned in the reference manual.)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 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.