The empty statement ";" - when is it useful?

Patrick Kreft patrick_kreft at gmx.net
Sat Jul 25 18:28:24 PDT 2009


KennyTM~ Wrote:

> for (; cond; inc) { ... }

for ( init ; cond; inc ) ...

init and inc are in the most programming language deducible to empty, but the resulting ';' isnt a empty statement 

so this us legal code:

void main(string[] args)
{
	for(;false;) {
		}
}






More information about the Digitalmars-d mailing list