Loop iterator - example.txt
Derek Parnell
derek at psych.ward
Sun Apr 30 05:25:04 PDT 2006
On Sun, 30 Apr 2006 20:34:09 +1000, <kellywilson at nowhere.com> wrote:
> Anyways, easy to add keyword, but in the same place as "continue", so
> why do it?
Because 'continue' and 'retry' are not the same thing. 'continue' means go
to the next iteration, and 'retry' means repeat the same iteration.
....CONCEPTUAL CODE....
for_start:
init_code;
for_test:
if ( end_condition ) goto for_end;
for_body:
do_something;
if <A> goto for_index; // continue
if <B> goto for_test; // retry
if <C> goto for_start; // restart
if <D> goto for_end; // break;
for_index:
update_index;
goto for_test;
for_end:
--
Derek Parnell
Melbourne, Australia
More information about the Digitalmars-d
mailing list