RFC: Behavior of continue in do/while loops.
Downs
default_357-line at yahoo.de
Wed Sep 12 09:57:29 PDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Regan Heath wrote
> I suspect whether it is intuitive or not depends on how you think of
> 'continue', for example:
> However, if you think of 'continue' as meaning 'go to the next
> iteration' then you would expect it to do whatever it would have done at
> the end of this iteration, before the next one.
> If you think of 'continue' as meaning 'go back to the start of
> the(this?) loop' then you wouldn't expect the condition to be evaluated.
The problem here is that for every case *but* a do/while loop, the two
perspectives behave exactly the same. See my follow-up to the other post
for a way to prevent this conflict.
> Regan
- --downs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFG6Bp5pEPJRr05fBERAuSBAKCLsmjUOiW/+xW+18EMOIs1v5bfkQCfTuvN
r1q+L+5LTegmDMgs/V0/VlA=
=JjXp
-----END PGP SIGNATURE-----
More information about the Digitalmars-d
mailing list