Re: text to number 2
- Posted by Kat <gertie at PELL.NET> Jan 27, 2002
- 438 views
On 28 Jan 2002, at 4:58, dmccu at connect.ab.ca wrote: > > ok, I have reviewed the value library function for converting a > sequence to a number, but how do you get a sequence like > {"-","1","2",".","2"} to be {"-12.2"} as the function needs it to be? > Or am I missing something obvious? I need to make a file filter and I > need to be able to convert back and forth regularly from string to > numeric. {"-","1","2",".","2"} is a nested sequence. "-12.2" ( or {-12.2} if you like) is what you need to val() with. Simply get the -12.5 as "-12.5" to start with, or make a pass thru the nested sequence, adding the pieces to one un-nested sequence, then val(un-nested sequence). Kat