On 16 Apr 2012 05:45:21 -0700, in bit.listserv.ibm-main you wrote:

>What??? "monopolizes the CPU"??? GO TO was made a pariah by an article by 
>Edgar Dijkstra.
>
>http://en.wikipedia.org/wiki/Considered_harmful
>
>And, of course, management went stupid (again) and came up with "you cannot 
>use the GOTO in any code at all!!!!". Which actually makes some COBOL more 
>complicated due to the requirement of nesting IF statements within IF 
>statements. And before the END-IF, that could be very complicated. I've see 
>old code like:
>
>IF ... THEN
>...
>   IF ... THEN
>   ...
>   ELSE
>   NEXT SENTENCE
>   ...
>   IF ... THEN
>   ...
>      IF ... THEN
>      ...
>      ELSE
>      NEXT SENTENCE 
>   ELSE
>   ...
>.
>
>Each internal IF had to have a corresponding ELSE with only NEXT SENTENCE in 
>it.

You are thinking of the 1974 standard which doesn't have IF  ...
END-IF.  Nesting becomes easier with the 1985 standard and when the IF
statement nesting becomes too complex you can move an IF ... END-IF
pair into a separate paragraph with little or no performance penalty
due to code movement and the simplified PERFORM code if you eliminate
GO TO statements.

Clark Morris 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to