[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guarded alts



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