Is it possible to assign a Comma Expression to a variable?
Lucian Danescu
lucidanescu28 at yahoo.com
Tue Nov 29 21:24:43 UTC 2022
To give some context, D-Scanner has a check that warns against
assigning a comma expression to a variable. Example:
```
a = (foo(), bar(), 1); // warn here
```
This check was implemented a while back, and from what I can see,
currently assigning a comma expression results in a compilation
error, hence that check in D-Scanner would not be necessary
anymore.
I just wanted to make sure that it is impossible to assign a
comma expression to a variable, or if it is possible, can someone
please clarify when and maybe give an example?
More information about the Digitalmars-d
mailing list