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



It already has changed. Using free format the "eval" opcode is virtually
useless. Unless you want to do a half adjust, which can probably just be
done with the %dech biff anyway (I don't feel like taking the time to
verify it in all circumstances right now). I haven't used a straight
"eval" since moving to free format.


Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777



"Willie J. Moore" <WJMoore@xxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
03/24/2011 10:25 AM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
"'RPG programming on the IBM i / System i'" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
RE: purpose of Z-ADD? (was: Question about legacy coding style)






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! :)

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.