Page 1 of 1

confuse about DO WHILE structure

PostPosted: Tue Oct 21, 2008 6:50 pm
by lxw039
how are you, guys, I have a question ask for yours help.
PERFORM 100-PROCESS-DATA UNTITL EOF='Y'.
eah cobol book says: this is a DO WHILE structure, but I think DO WHILE describ as following:
" loop body excute if condition is true, otherwise exit loop if condition is false."
but anybody knows that the above statement is loop body excute if condition(EOF='Y') is false,
when the condition is true, it will exit loop.
as a result, the statement is not a DO WHILE structure,
anybody can tell me the answer? thanks first.

Re: confuse about DO WHILE structure

PostPosted: Wed Oct 22, 2008 2:07 am
by dick scherrer
Hello,

Yes, it can be thought of as a DO WHILE.

The WHILE is "EOF not= 'Y'".

Re: confuse about DO WHILE structure

PostPosted: Wed Oct 22, 2008 6:25 pm
by lxw039
I got it, thank you very much, Mr. Dick.!

Re: confuse about DO WHILE structure

PostPosted: Thu Oct 23, 2008 2:31 am
by dick scherrer
You're welcome :)

d