What is a "comma expression"?
rempas
rempas at tutanota.com
Sun Oct 10 12:01:33 UTC 2021
This is the first time I'm finding something like that. I'm
having the following code in C:
```
if (0 == (i >> 7)) {
if (len < 1) return -1;
v = i;
return *ret = v, 1;
}
```
This is part of a function that returns an `int`. When I'm
running this in C, it works. However in D, I'm getting the
following error message:
```
Error: Using the result of a comma expression is not allowed
```
Can someone explain what comma expressions are and why they don't
work in D (or if the only doesn't work as returned values from a
function)?
More information about the Digitalmars-d-learn
mailing list