General rule when not to write ;

Paul Backus snarwin at gmail.com
Wed May 19 15:42:43 UTC 2021


On Wednesday, 19 May 2021 at 13:46:55 UTC, Jesse Phillips wrote:
> The ; is used to end a statement, but I don't know how to 
> define that and distinguish it from an expression.

An expression has a value. A statement doesn't.

You can add a `;` at the end of an expression to make a statement 
from it. When you do, the value of that expression is discarded.


More information about the Digitalmars-d-learn mailing list