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



Hi James

Responding not to your reply but to what you replied to - was that confusing?

Of course we can add events to the cycle. A select-when on function keys adds events all the time.

People talk of OO and event-driven as if it's something new. I suggest that it is rather a codification of coding styles people have come up with.

I believe that, whether RPG/COBOL developers know it, they often use OO principles. The languages do not support it well natively, and you have to put in the constructs yourself to make it work. But the principles of OO, such as encapsulation, can be utilized effectively in any language.

Vern

On 2/23/2012 10:59 AM, James Lampert wrote:
The RPG cycle is
most certainly an event-driven process. the handlers used with
XML-INTO, XML-SAX, or Open Access are also coded in an event-driven fashion.
**************
Well ok, you could say it is event driven. But most (non-RPG) programmers
wouldn't call it like that. The problem with this implementation (besides
that these events are triggered within a specific structure/order) is that
there is some coupling between the event and code.
. . .
Also, you can't simply add your own events.
. . .

Both of you miss the point: While it's debatable whether or not "total
time" or "initialization" qualify as "events," The Cycle itself *is* a
ready-made event-loop, repeating the main body of the program until some
*event* (whether a primary file running out of records, or something
explicitly setting on LR) tells it to shut down, and in which various
other *events* are responded to in various ways.

--
JHHL

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.