On Friday, 2 March 2018 at 09:44:20 UTC, psychoticRabbit wrote:
trying to do this C code, in D, but getting error:
"Error: assignment cannot be used as a condition, perhaps `==` was meant?"

any help much appreciated:

------
while ((*dst++ = *src++)) {}
------

You can't use this syntax inside a while/if/... to prevent mistakes due to similarity between assignment syntax (=) and comparison syntax (==)

Andrea

Reply via email to