코볼 IF문 continue 이해하기
2011. 5. 31. 10:18ㆍ카테고리 없음
What is the difference between NEXT SENTENCE and CONTINUE?
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문 과 display 1 display 2. 까지가 한문장이다.
그러므로 다음문장인 display 3으로 실행된다.
if a>b
continue
end-if
display 1
display 2.
display 3.
it will display 1 2 3. if a>b.
continue는 if문 만 빠져나가기 때문에 display 1,2,3모두 실행한다.
let me know if it is not correct.
나한테 알려줘 맞지 않다면.
출처 http://www.geekinterview.com/question_details/6170
IF문 과 display 1 display 2. 까지가 한문장이다.
그러므로 다음문장인 display 3으로 실행된다.
continue는 if문 만 빠져나가기 때문에 display 1,2,3모두 실행한다.
let me know if it is not correct.
나한테 알려줘 맞지 않다면.