|
Trevor Perry wrote:
You do not have to 'deal' with the cycle. It is ALWAYS there, but there are
so many RPG programmers who don't even know what it is - where are they
'dealing' with it?
When they take some action to keep their program from going into an
infinite loop.
Consider the following RPG program, perhaps the simplest one conceivable
(note that spacing is probably off; that's what all the nice features of
SEU are for):
C 'I like spam.' DSPLY
That's all; nothing else. You try to compile that, you'll get a warning
that it can't find a way for the program to end. And indeed it won't.
Because you have not dealt with The Cycle, The Cycle will deal with YOU,
if you try and execute the above one-liner (and depending on the
circumstances, you might have to kill the job it's running in).
On the other hand,
C SETON LR
C 'I like spam.' DSPLY
will do what the first example was probably intended to do: display the
test message exactly once, and end normally. But it only ends normally
because you HAVE DEALT WITH The Cycle, by ending it immediately with the
SETON LR statement.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.