Re: Please help me understand my code



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

.



Relevant Pages

  • Re: "Mastering C Pointers"....
    ... > Memory is just a big array of bytes again. ... > (If you're not totally familiar with loops in general, ... My point was that for and while loops compile down to ... > organize this enormous stream of instructions ...
    (comp.lang.c)
  • Re: Best video card/driver for shading supprot
    ... > fungus wrote: ... > However only limited (no loops and conditional code). ... conditional code" in hardware and a restricted number of instructions ...
    (comp.graphics.api.opengl)
  • Re: randomized white noise = white noise?
    ... due to 4 brne and 16 ldd 2-cycle instructions) but still is fast ... 20 MHz would give about 125000 loops per second max. ...
    (sci.electronics.design)
  • Re: Loading single word to a xmm register
    ... and consequently allows alot more parrallelism in numeric ... loops. ... they give you alot better control of how the memory ... as well as provide special prefetch instructions ...
    (alt.lang.asm)