It would be nicer if the compiler refuses to accept assignment to an argument of the method..The argument "aNumb" actually takes on the value of the first argument viz: of the passed aText..ok something your post does bring up intrinsically not ok with Pharo, but not threatening a bug, as in normal code practice:
a) We should never assign values into the arguments..
On compiling ..As I see it, the Pharo compiler makes "aText" now a temp variable of the block ( actually the while loop is not relevant .. )
As for suggestion that you liked, I would suggest simply run through Pharo By Example first thoroughly... and then take up as much of test runs through existing applications to understand some of the concepts of how to code..
Free forum by Nabble | Edit this page |