On Wednesday 28 July 2004 9:49 pm, Cancerbero wrote:
Hi. I don't know how formally make this kind of suggestions so excuse me if I'm doing it wrong.
My situation is this: The user's input is a String representing a floating point number, so I want something that converts a String representing a floating point number to a Float. Example: Something like String>>asFloat so '3.14' asFloat returns the Float 3.14.
So my suggesiont is to add a method String>>asFloat. For example:
What about
'3.14' asNumber => 3.14 '3' asNumber => 3
or if you really wanted to be sure:
'3.14' asNumber asFloat => 3.14 '3' asNumber asFloat => 3.0