Liste des Groupes | Revenir à l c |
[...]
Incidentally, a language change to C was once proposed, so that
a do/while could also have an expression after the while().
Note that this change is backwards compatible with C as it is,
because a simple semicolon after while() is an empty statement.
Adopting this proposal would mean that the language would allow,
for example
do {
// this part will always be done at least once
// and once more for each time 'condition' is true
} while( condition ){
// this part will be done zero or more times
}
allowing a convenient way of writing "loop-and-a-half" type
loops. [...]
Les messages affichés proviennent d'usenet.