On 11.12.2012 00:12, Ladislav Marek wrote:
You are using non-local return in block, thats not correct (in this
case). ^false will return from your method and sort: will not be
completed. Last expression is the result in block, so correct code
is:
myCollection sort: [ :a :b | a value not ].
myCollection inspect.
BINGO! Worked like a charm.. So, what you're saying is that the
forced ^false will essentially abort the sort operation completely
leaving it unchanged? Ok.. Did some googling around for the
phrase "non-local return smalltalk" and found a good definition
on the objectmix.com website.. I'd never heard of this before but it
certainly explains the behavior I was seeing.. Thanks for the heads-up!
_______________________________________________
help-smalltalk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-smalltalk