why ; ?

Robert Fraser fraserofthenight at gmail.com
Mon May 5 12:44:33 PDT 2008


Tomasz Sowinski wrote:
> BCS Wrote:
> 
>> In "for(;;);" the trailing ; is a null statement.
> 
> I just did that and the compiler said:
> "use '{ }' for an empty statement, not a ';' "

I'm very glad of that protection there. Where I used to work, an 
accidental semicolon on an if statement ended up causing a production bug.



More information about the Digitalmars-d mailing list