Hi all,
Stephen is right and NEXT SENTENCE should be avoided. Reason? See this code I've posted before in a previous thread (maybe if people think it worth it, a FAQ should be created for this subject?)
Back in the days when everybody coded periods, NEXT SENTENCE would have been the same as CONTINUE (if it existed!). Nowadays, they are VERY different. Consider:
IF A = B
CONTINUE
ELSE
DISPLAY 'Hello'
END-IF
DISPLAY 'GOT HERE'
DISPLAY 'AND HERE'
.
EXIT-PARA.
EXIT.
and
IF A = B
NEXT SENTENCE
ELSE
DISPLAY 'Hello'
END-IF
DISPLAY 'GOT HERE'
DISPLAY 'AND HERE'
.
EXIT-PARA.
EXIT.
In the 1st example, if A equals B then GOT HERE and AND HERE will be displayed.
Whereas in the 2nd example, if A does equal B, it will drop thru to the next period ie GOT HERE AND HERE will not be displayed.
In legacy coding. you can expect to find a period after the END-IF, and in this case the effect of the two statements would be the same.
Basically, BE VERY CAREFUL WITH NEXT SENTENCE !!!! It can miss huge chunks of code as it will begin processing at the statement following the next period. In programs with one period at the end of the section, then statement would drop thru to the end of the section!!!
HTH
Marc