[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guarded alts
- To: inferno@interstice.com
- Subject: guarded alts
- From: "Rob Pike" <rob@achille.research.bell-labs.com>
i was too hasty in my answer to this question;
alt
{
waitforoutput && (chin <-= 99) =>
x:=1;
waitforinput && (val = <-chout) =>
y:=2;
}
does the alt as usual, then evaluates the expressions and throws away the
result; that is, the guards are no-ops. if you enable warnings in the compiler
it tells you as much:
"result of expression is unused"
-rob
- Prev by Date: Re: inferno and limbo discussions
- Next by Date: Inferno on MacOS!
- Prev by thread: Re: inferno and limbo discussions
- Next by thread: Inferno on MacOS!
- Index(es):