BroadcomMFD / cobol-control-flow

COBOL Control Flow is an extension for Visual Studio Code that provides graphical visualization of program flow for programs written in COBOL.
https://marketplace.visualstudio.com/items?itemName=broadcomMFD.ccf
Other
9 stars 8 forks source link

EXIT SECTION causes graph to end instead of continue. #48

Closed ekuether closed 1 year ago

ekuether commented 1 year ago

Issue:

Putting an EXIT SECTION instead of just an EXIT will cause the graph to stop looking at the rest of the program.

Example Code:

   IDENTIFICATION DIVISION.
   PROGRAM-ID. HLLOWRLD
   DATA DIVISION. 

   WORKING-STORAGE SECTION. 
   01  USRNAME           PIC X(10).

   PROCEDURE DIVISION.
   0000-MAIN SECTION.
       PERFORM 1000-GET-NAME
       PERFORM 2000-TEST
       DISPLAY 'HELLO 'USRNAME
       GOBACK
       .
   1000-GET-NAME SECTION.
       ACCEPT USRNAME.
       PERFORM 1000-EXIT.
   1000-EXIT.
       EXIT SECTION.
   2000-TEST SECTION.
       PERFORM 2000-EXIT.
   2000-EXIT.
       EXIT SECTION.

Example Graph

image

Comments:

Notice how we perform both 1000-GET-NAME and 2000-TEST, but only 1000-GET-NAME is shown on the graph

zimlu02 commented 1 year ago

Fixed in v1.0.5 release.