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



the problem with RESET is that it does not work on BASED data structures and
LIKEDS defined data structures. At least using RESET on a based data struct
gives a compile error. Using RESET on a LIKEDS defined struct compiles ok,
but then it does not assign the INZ values from the LIKEDS model struct.
Very confusing.

-Steve

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Hans Boldt
Sent: Tuesday, January 13, 2004 10:35 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: *INZSR - I still love you!!!


DeLong, Eric wrote:
> Rick, as I recall it, the real need for *INZSR came from the RESET opcode,
> which depends on a step in the cycle where initialized storage is saved
> before starting the main calcs.  *INZSR lets you programatically
initialize
> storage before it is captured as "initialized".  This lets you RESET
complex
> structures easily and quickly to their original initialized values.  For
> some reason, I've never seen RESET used much in the code I've maintained.
>

I'm not sure when or where I last told this story:

I still remember the design meetings where this particular set of
enhancements was discussed. At the time, I was busy working on the SAA
RPG 370 compiler, but was occasionally invited to design meetings for
the RPG III compiler on the 400. At this particular set of meetings, we
were discussing what enhancements were needed in the area of
initialization, such as initial values on I-Specs, named constants,
CLEAR opcode, etc. I was arguing to keep things simple, but others
wanted more and more functionality. I got fed up with that "creeping
featurism" and suggested something I thought was totally ridiculous.
Unfortunately, that backfired on me when the developer loved the idea,
and I couldn't talk her out of it. That "ridiculous" idea was the RESET
opcode. It took many releases before RESET worked properly, long after
the original developer left IBM for a job in Redmond.

Personally, I'd just as soon see explicit assignments instead of the
RESET opcode. If something needs to be reset to some value in several
places, then the initializations should go into a separate procedure or
subroutine and called as needed. There's nothing magical about a
separate RESET opcode, and the use of such an opcode can increase the
resources needed for the program.

Cheers! Hans


_______________________________________________
This is the RPG programming on the AS400 / iSeries (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 ...

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.