Re: for loops
- From: "Andrew Howell" <ajh@work>
- Date: Tue, 17 Jan 2006 13:46:25 -0000
"Carsten Bonde" <bonde AT real-inkasso DOT de> wrote in message
news:uiTfLq0GGHA.344@xxxxxxxxxxxxxxxxxxxxxxx
> Beside that, i wouldnt use a FOR ENDFOR-construct, but a WHILE since you
> should exit when the user enters a correct password. Using "EXIT" is in my
> opinion NOT an option <s>
I'm with you in principle but there *are* more lines of code for an
equivalent WHILE and it does execute slower (I guess most likely because
your increment happens in Fox rather than C.) It's unlikely the speed gain
would be beneficial really (in any routine,) I'm just saying... <g>
I've used FOR with EXIT for simple loops, eg checking a string for any alpha
characters present (as soon as you hit one, may as well EXIT.) Although even
that was before I knew how to do it with CHRTRAN.
I've always hated DO WHILE .T. more than FOR..EXIT..NEXT - I guess because
the construct is already waiting for a flag but for all that, why does EXIT
exist? To not be used? <s>
--
Regards
Andrew Howell
.
- Follow-Ups:
- Re: for loops
- From: Carsten Bonde
- Re: for loops
- References:
- RE: for loops
- From: Lee Mitchell
- Re: for loops
- From: Carsten Bonde
- RE: for loops
- Prev by Date: Re: Problem with parent-child grids
- Next by Date: Re: Problem with parent-child grids
- Previous by thread: Re: for loops
- Next by thread: Re: for loops
- Index(es):