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



> From: Leif Svalgaard

> >From COBOL:
>
> GO TO AAA BBB CCC DEPENDING ON NNN

Ah.  An exception to every rule.  GOTO ... DEPENDING can indeed be
implemented as that messiest of instructions, the indexed GOTO.  I consider
an indexed GOTO a conditional GOTO, but it is indeed a loophole to my
initial statement.  There is no "condition"; the index itself determines the
branch.  Good catch.


> or this horror:
>
> PERFORM PPP
> ALTER PPP TO QQQ
> PERFORM PPP
> ALTER PPP TO SSS
> PERFORM PPP
> STOP RUN.
>
> PPP.
>     GO TO XXX.
>
> XXX.
>     DISPLAY "XXX".
>
> QQQ.
>     DISPLAY "QQQ".
>
> SSS.
>    DISPLAY "SSS".

This one doesn't pass the test, though.  The ALTER instruction is ugly, but
doesn't do any conditional processing - that is, it always performs the same
instructions regardless of program data.  Therefore, in itself it cannot
support, say, a DO WHILE loop.  You would still have to have a way of
conditionally executing the ALTER command.

Joe



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.