× 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: <jamesl@hb.quik.com>
-0500 "Leif Svalgaard" wrote:
> > no, it is worse. A
> case statement continues after
> > the statement (unless to "goto" somewhere
> inside
> > it), but the GO TO DEPENDING don't come back.
> . . .
>
> As I said,
> it's a PRIMITIVE form. If the "coming back" (or more precisely,
> "coming back
> together") is coded manually, it effectively provides a CASE
> construct where
> the language itself doesn't support it.

It shows that you only took one year of Cobol :-)
The BIG difference is that a *single* GO TO destroys the
'structure' of your program. Consider:

PERFORM AAA
PERFORM BBB
PERFORM CCC
PERFORM BBB
STOP RUN
...
AAA.
...
    GO TO BBB.
...
BBB.
    ADD 1 TO NNN.
...
CCC.
   ADD 2 TO NNN.
...

because of the GO TO BBB, BBB will "fall thru" to
CCC when done. If you PERFORMed BBB it would
not. Inside of BBB you cannot go back to where you
came from because BBB cannot know which PERFORM
called it (you can, of course, cheat by inserting MOVE 1
TO RTN before the first PERFORM BBB and a MOVE 2
TO RTN before the second PERFORM BBB, but you are
digging yourself deeper in...). What COBOL needs is
a "CAME FROM" statement  :-).





As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.