Re: Please help me understand my code
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx>
- Date: Sun, 01 Jul 2007 05:39:01 -0800
Richard Maine wrote:
(snip)
Nothing. Literally. The CONTINUE statement is not actually directly
related to loops. It just happens to often be used with loops (at least
in older forms; newer forms are more likely to use END DO). The CONTINUE
statement does nothing itself. It is used as a placeholder when you need
a statement for some reason, but don't want to have the statement
actually do anything. Almost always, what you are doing is using the
CONTINUE as a place to put a statement number.
(snip)
From Fortran I:
"CONTINUE is a dummy statement which gives rise to no instructions
in the object program. Its most frequent use is as the last
statement in the range of a DO, where it provides a statement
number that can be referred to in transfers which are desired
to become, in the object program, transfers to the indexing
instructions at the end of the loop."
I presume the word CONTINUE comes from continue on to the
next statement, though in the use as a last statement
of a DO loop that doesn't seem quite right.
In C, continue is used inside loops similar to the Fortran
CYCLE statement. That is, continue to the next iteration
of the loop. I don't know that it makes any more sense
that way.
-- glen
.
- Prev by Date: Re: Form k = i + j and test for overflow.
- Next by Date: Re: Speed of code compiled with IVF 10.0 ?
- Previous by thread: Re: Please help me understand my code
- Next by thread: Re: Please help me understand my code
- Index(es):
Relevant Pages
|