The dyadic form takes a default value to substitute for non-numerics, e.g.

   _999 ". '1 2.2 3.14 4j5 no good'
1 2.2 3.14 4j5 _999 _999

Infinity is often a good default as it's unlikely to be a valid data value:

   _ ". 'Friday, December 30, 2011 11:17:20 AM'
_ _ _ 2011 _ _


On Fri, Dec 30, 2011 at 8:08 PM, David Vaughan <purpleblue...@googlemail.com
> wrote:

> ".
> should work
>
> ___________________________
>
> David Vaughan
>
> On 30 Dec 2011, at 20:51, Blake McBride <bl...@mcbride.name> wrote:
>
> > Greetings,
> >
> > In APL I used to use the execute function to convert a string (like
> > '123.45') into a number 123.45 (after I verified that it was a valid
> > number).  How can I do this in J?
> >
> > Thanks.
> >
> > Blake McBride
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> 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

Reply via email to