× 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.



Eval is/was part of the language so pseudo-free format statements
(EVAL A=B) could be put into a fixed format. Eval is not needed (or
desired IMO) in free format.

On Thu, Mar 24, 2011 at 10:38 AM, Robert Rogerson <rogersonra@xxxxxxxxx> wrote:
Hi Willy,

*"But as with anything, in a few years I am sure that some change will be
made to RPG and this same line of thought about the 'eval' statement will be
going on."*

This has already been going on for years.  In free format RPG it is rare
that the Eval opcode is used.  In fact, I would think it's generally the
accepted practice to drop the Eval opcode.

Robert Rogerson

On Thu, Mar 24, 2011 at 10:25 AM, Willie J. Moore <WJMoore@xxxxxxxxxxxx>wrote:

To me (old time programmer) it seams that 'z-add' is easier to understand
than 'eval'.
The purpose of 'z-add was to set the result field to the number in factor2.
This was used mostly to zero out a field either before or after using it for
calculation or printing.
The z-add factor2 to result field lets you know what is happening, but the
'eval' opt code evaluates what? When something is evaluated, it just means
that it check for something in that field. But in RPG it means that it can
change the contents of a field also. The one nice thing is it does replace
at least two other opt codes (z-add & move). This does cut down on coding.
But as with anything, in a few years I am sure that some change will be
made to RPG and this same line of thought about the 'eval' statement will be
going on.


William Moore
California Fine Wire
805-489-5144
wjmoore@xxxxxxxxxxxx

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Bob P. Roche
Sent: Thursday, March 24, 2011 6:21 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: purpose of Z-ADD? (was: Question about legacy coding style)

I'm not sure I'd call it a "legacy leftover" but yes Z-ADD existed before
EVAL was ever and opcode.



From:
Luke Gerhardt <lgerhardt@xxxxxxxxx>
To:
rpg400-l@xxxxxxxxxxxx
Date:
03/24/2011 08:18 AM
Subject:
Re: purpose of Z-ADD? (was: Question about legacy coding style)
Sent by:
rpg400-l-bounces@xxxxxxxxxxxx



Since it was mentioned here and tickled a neuron...I might as well ask:
I've always wondered, what is the purpose of Z-ADD?  Isn't it just the
same to EVAL = 0, or EVAL = whatever you really want it to be?  Or is
this just a legacy leftover that only still exists in order to mess with
my mind?

Thanks!  :)
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



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.