More on Rust
Walter Bright
newshound2 at digitalmars.com
Thu Feb 10 11:15:58 PST 2011
Nick Sabalausky wrote:
> "bearophile" <bearophileHUGS at lycos.com> wrote in message
> news:iivb5n$na3$1 at digitalmars.com...
>> auto x;
>> if (localtime().hours >= 8) {
>> x = "awake!"
>> } else {
>> x = "asleep, go away."
>> }
>> log "I'm " + x;
>>
>
> That would be really nice to have in D.
auto x = (localtime().hours >= 8) ? "awake!" : "asleep, go away.";
More information about the Digitalmars-d
mailing list