Re: Variable assignment in “if” condition in Dlang

Steven Schveighoffer schveiguy at gmail.com
Sun May 3 17:00:00 UTC 2020


On 5/3/20 12:30 PM, kdevel wrote:
> It surprisingly [1] [2] prints:
> 
>     false
>     true
> 
> In the string case there is at least not the guarantee that the string 
> is non-empty.

Then you have to do it in 2 steps. It would be nice to have a way to do 
this, but there isn't right now.

-Steve


More information about the Digitalmars-d-learn mailing list