On Mon, Sep 12, 2011 at 8:55 PM, David Vaughan <purpleblue...@googlemail.com> wrote: > Ah thanks, I need to read the dictionary pages more carefully for those > little things. > > A couple of times I've found myself wanting to convert a number into a list > of its digits - what is the best approach for this?
10 #.inv 123 1 2 3 ,.&.": 123 1 2 3 > This is way I've found: > > 0".,' ',.":123 > 1 2 3 > > Though it seems slightly clunky? > > Also, I try to define it as a verb and I'm not sure why I'm getting a syntax > error with it: > > atol=: 3 :'0".,' ',.":y' > |syntax error > | atol=: 3 :'0".,'',.":y' You need to double your quoted quotes. > Finally, how might one write that as a tacit verb? 13 :'0".,'' '',.":y' 0 ". [: , ' ' ,. ": Note that this assumes you have configured J for linear display form. -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm