For a string I couldn't see any difference with or without the "1 ; however, if it is greater than rank 1 the fill may not be what he wants.
_ ([ [^:(0...@]) ".)"1] '12,34 56 a',:'' 1234 56 _ _ 0 0 On Tue, Jan 11, 2011 at 12:26 PM, Henry Rich <henryhr...@nc.rr.com> wrote: > He said y was a string, and the rank of ". is infinite; so applied to a > table it would give different results from what was requested. > > Henry Rich > > On 1/11/2011 2:11 PM, Don Guinn wrote: > > Why is there a "1 on the definition? > > > > On Tue, Jan 11, 2011 at 9:29 AM, Henry Rich<henryhr...@nc.rr.com> > wrote: > > > >> How about > >> > >> ([ [^:(0...@]) ".)"1 > >> > >> Henry Rich > >> > >> On 1/11/2011 10:46 AM, richard.vaug...@us.thewg.com wrote: > >>> I need a simple utility that will return the numeric value represented > by > >>> a string y, following the rules of dyadic ". except returning the > scalar > >> x > >>> if y is empty. This should be fast since it is to be applied under> > to > >>> large arrays of boxed strings whose exact format cannot be controlled. > I > >>> have observed that if y is preceded by a TAB the result of ". is > >>> unchanged, and if y is a TAB alone the result is x; therefore adding a > >> TAB > >>> before (each) y seems to do the trick. But this is not documented in > the > >>> Vocabulary. Can I trust this behaviour to continue in future editions > of > >>> J? > >>> > >>> Adding a space would seem more natural but ". treats y that is all > spaces > >>> like an empty vector. Best would be if the left argument to ". had an > >>> optional second element, specifying the exact number of elements to be > >>> returned in each row, or default 0 for the present behaviour. Then I > >>> could force an empty y to receive the padding value 0{x. > >>> > >>> Thanks, > >>> > >>> Richard Vaughan > >>> This message is intended only for the addressee and may contain > >> information that is confidential or privileged. Unauthorized use is > strictly > >> prohibited and may be unlawful. If you are not the intended recipient, > or > >> the person responsible for delivering to the intended recipient, you > should > >> not read, copy, disclose or otherwise use this message, except for the > >> purpose of delivery to the addressee. If you have received this email in > >> error, please delete and advise the IT Security department at > >> info...@thewg.com immediately. > >>> > >>> Please consider the environment before printing this 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 > >> > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm