Ruby knows that:
a = 4e5
... is a float, turning it into:
400000.0
If I have a string "4e5", is there a way for me to leverage the parser's
ability to decipher this as a float? I know I can call:
"4e5".to_f
... but for any string value, how can I do a proper conversion? I want a
routine like this:
def convertString(value)
# do magic stuff to convert value to proper Numeric,
# assuming it's a valid Numeric representation
end
I'd love to be able to call a Ruby routine to do this for me, same as the
parser does when reading in a script.
Chris