Re: text to number 2

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu