
- Forum
- Programming Talk
- COBOL
- Is there any difference??
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 ...
-
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
-
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.
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
eg.
IF (X=Y)
CONTINUE
ELSE
NEXT SENTENCE
END-IF
GO TO A1000-PARA-EXIT.
the flow will jump to this sentence.
-
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

Reply With Quote





