On Thursday, 2 November 2017 at 08:58:03 UTC, codephantom wrote:
Now, I'm new to D (I only discovered it a month or so ago)...but do free floating statements already exist in the language?

There's this one:

void main() {
    int i;
    switch (i)
        default: break;
}

you have 3 non-ambiguous and contiguous statements without a block: a switch, a default case (the "free-floating" one) and a break. Now why is this allowed is another story ;)

The whole combination makes sense just like :

function ...
in ...
out ...
do {}

would.

Reply via email to