And function calls return the value of the last expression evaluated.I think it is possible to have a mostly consistent understanding based on that "rule", but it involves thinking of void-context expressions as having values. IMO it is a lot simpler (and completely instead of mostly consistent) to think of every statement as having a context and a return value. This issue with for loops is one place where the two models show their difference.
In reply to Re^7: Unhappy returns
by ysth
in thread Unhappy returns
by tlm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |