Yikes. I’ve used the false: nil expression a lot in the past kind of assuming it meant “if false don’t do anything”, but now I come to think about it the expression has to return something. It’s always worked fine when I’ve used it but I think I’ve been lucky!
I guess a way to use this reliably is to use an EventVariable, assign the new value to the EventVariable in the true: clause, put nil in the false: clause, put a comma after the expression then explicitly return the EventVariable.
| ev |
ev := EventVariable new initialValue: 0.
(?freeze true: (ev <+ ( (?BackNForth + 1) * ?grainSize )) false: (nil)),