Testing if a String is a number

Peter Crowther Peter at ozzard.org
Wed Jul 5 19:09:16 UTC 2006


> From: Damien Cassou
> I'm surprised there is no #isNumber selector for strings.

Do you mean "responds to arithmetic messages" or "could be converted
into something that responds to arithmetic messages"?  #isNumber means
the first (to me); your use seems to be the second.  Given that I have
code that tests for #isNumber before sending (eg) #+ to an object, I'd
be unhappy about the second use!

		- Peter



More information about the Squeak-dev mailing list