Page 1 of 1

Some FUN with GO TO

PostPosted: Wed Oct 06, 2010 3:27 pm
by sandeepan
Guys,
I want to understand the flow using GO TO. Can u guys tell me what will the displays in order for the below code .

   PROCEDURE DIVISION
   
   PERFORM A1.
   PERFORM B1.
   STOP RUN.
      
   
   A1   SECTION.

      DISPLAY 'A1 SECTION'.

   A11.
      DISPLAY 'A11 PARA'.
   A12.
      DISPLAY 'A12 PARA'.
   A13.
      DISPLAY 'A13 PARA '.
               
               EXIT.
       
       
        B1    SECTION.
       
        B11.
                 DISPLAY 'B11 PARA'.
        B12.
           DISPLAY'B12 PARA'.
           GO TO A12.
        B13.
           DISPLAY 'B13  PARA'.
           
           EXIT.

Re: Some FUN with GO TO

PostPosted: Wed Oct 06, 2010 4:41 pm
by Robert Sample
What do you think they will be?

Hint: you have an infinite loop defined in your code.

Re: Some FUN with GO TO

PostPosted: Wed Oct 06, 2010 10:01 pm
by KRISHAN
it goes infinete loop............