How to hand in a closure variable

bearophile bearophileHUGS at lycos.com
Fri Apr 4 08:15:54 PDT 2014


Bienlein:

> What I was actually looking for was how to get this to work:
>
> immutable int b = if(1 == 1) { return 123; } else { return 456; 
> };

immutable b = (1 == 1) ? 123 : 456;

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list