Answered Questions

  • What is the difference between NEXT SENTENCE and CONTINUE?

    NEXT SENTENCE gives control to the verb following the next period. CONTINUE gives control to the next verb after the explicit scope terminator. (This is not one of COBOL II's finer implementations). It's safest to use CONTINUE rather than NEXT SENTENCE in COBOL II.

    Star Read Best Answer

    Editorial / Best Answer

    Answered by: umapathi

    • Jul 20th, 2006


    the following code explains u clearly

    If A>B

    next sentence

    end-if

    display 1

    display 2.

    display 3.

         it will display only 3. if a>b

    if a>b

    continue

    end-if

    display 1

    display 2.

    display 3.

    it will display 1 2 3. if a>b. let me know if it is not correct.

    Prasanth Karthikeyan

    • Sep 14th, 2018

    Continue pushes the control to Add +1 to Input-count. Say if Input-count was 0 then the value will be iterated to 1

    Next sentence will never add +1 to Input-count it will bypass the command. Say if Input-count was 0 then the value will remain same.

    Amit

    • Jan 17th, 2017

    When NEXT SENTENCE is coded, Program will not add +1 to INPUT-COUNT.
    When CONTINUE is coded, +1 will be added to INPUT-COUNT.