Thanks guys. t
-------- Original Message -------- From: "Devon McCormick" <[EMAIL PROTECTED]> Apparently from: [EMAIL PROTECTED] To: "General forum" <[email protected]> Subject: Re: [Jgeneral] Number: String -> Float Date: Tue, 24 Jul 2007 17:43:14 -0400 > There's no kill like overkill: > rplmn=: 13 : '(y e. ''-'')}y,:''_''' NB.* Replace minus by negative > rplmn 'hi 3.14 -2.718 3e-6' > hi 3.14 _2.718 3e_6 > onlynumc=: 13 : 'y#~y e.''0123456789 .e-_''' NB.* Only numeric chars > onlynumc 'hi 3.14 -2.718 3e-6 4.5e+6' > 3.14 -2.718 3e-6 4.5e6 > 43.2 + ". > {: cut rplmn onlynumc z > 1.2345683e8 > > > On 7/24/07, Roger Hui <[EMAIL PROTECTED]> wrote: > > > > _999 ". z > > _999 _999 1.23457e8 > > > > > > > > ----- Original Message ----- > > From: [EMAIL PROTECTED] > > Date: Tuesday, July 24, 2007 14:24 > > Subject: [Jgeneral] Number: String -> Float > > To: [email protected] > > > > > Hello, > > > > > > I want to convert some numbers (representing currency) into a > > > float (or something which allows me to later do +/ ). > > > e.g. > > > > > > > > > z=.'Gross amount 123,456,789.90' > > > 43.2 + ". > {: cut z > > > 166.2 499.2 833.1 > > > > > > although I under stand why (comma seperated numbers are treated > > > as a list of numbers) my intention is to obtain > > > 123456833.10. Any hints ? > > > > > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > > -- > Devon McCormick, CFA > ^me^ at acm. > org is my > preferred e-mail > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
