Exforsys
+ Reply to Thread
Results 1 to 3 of 3

Is there any difference??

This is a discussion on Is there any difference?? within the COBOL forums, part of the Programming Talk category; Hi All, I wanted to transfer control to next verb after explicit scope terminator. In this situation I am confused ...

  1. #1
    blenda is offline Member Array
    Join Date
    May 2006
    Answers
    36

    Is there any difference??

    Hi All,
    I wanted to transfer control to next verb after explicit scope terminator. In this situation I am confused whether to use NEXT SENTENCE or CONTINUE in my program. Do both CONTINUE and NEXT SENTENCE functions the same way. If not what is the difference. Somebody provide a brief answer to this query.

    Regards,
    Blenda


  2. #2
    anuragvma is offline Junior Member Array
    Join Date
    Jun 2006
    Answers
    2
    Quote Originally Posted by blenda
    Hi All,
    I wanted to transfer control to next verb after explicit scope terminator. In this situation I am confused whether to use NEXT SENTENCE or CONTINUE in my program. Do both CONTINUE and NEXT SENTENCE functions the same way. If not what is the difference. Somebody provide a brief answer to this query.

    Regards,
    Blenda
    Yes there is a difference between these two ....CONTINUE means "Do nothing" this is a NULL statement, whereas NEXT SENTENCE will take your program flow to the next coded sentence.
    eg.
    IF (X=Y)
    CONTINUE
    ELSE
    NEXT SENTENCE
    END-IF
    GO TO A1000-PARA-EXIT.
    the flow will jump to this sentence.


  3. #3
    cyrus is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    128
    In a nutshell if you don’t want to do any action that is do nothing then take up CONTINUE verb. But in contrast NEXT SENTENCE is actually an unconditional branch to whatever follows the next period. In effect, it is a restricted form of GO TO


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...