> From: Sherlock, Ric
>
> > From: Brian Schott
> > Try this.
> >
> > load'strings'
> > '.' dropto ": 5.1
>
> You could extend this idea to return numeric:
> ('0','.'&dropto) &.": 5.1
> 0.1
>
> But it would need to be more complicated to handle arrays of numbers.
Could just use "every":
decimal=: ('0','.'&dropto) &.":
9!:11 ]16
decimal every 3 7$5.1 5.2 5.33
0.1 0.2 0.33 0.1 0.2 0.33 0.1
0.2 0.33 0.1 0.2 0.33 0.1 0.2
0.33 0.1 0.2 0.33 0.1 0.2 0.33
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm