General rule when not to write ;

FeepingCreature feepingcreature at gmail.com
Tue May 18 16:28:51 UTC 2021


On Tuesday, 18 May 2021 at 16:27:13 UTC, Alain De Vos wrote:
> After each } i write a ;
> And let the compiler tell me it is an empty instruction.
> What are the general rules where ; is not needed after a }

Is `;` ever needed after a `}`?

I guess in `void delegate() dg = { writeln!"Hello World"; };`, 
but that hardly counts, because it belongs to the variable 
declaration, not the `{}`.


More information about the Digitalmars-d-learn mailing list