braceless with statements
kdevel
kdevel at vogtner.de
Fri Nov 12 23:43:51 UTC 2021
On Friday, 12 November 2021 at 21:44:25 UTC, user1234 wrote:
> void main()
> {
> with (L) - R;
> }
>
> now remove the parens... oops the parser sees a binary minus ;)
that would then translate into
void main()
{
with (L - R) { }
}
for which the compiler complains about undefined identifier `R`.
I must admit I have difficulty to get your point. Under the
removed parantheses version you could (additionally) write the
original code as
void main()
{
with L;
- R;
}
More information about the Digitalmars-d
mailing list