Hi All,

I am struggling with the amend adverb. I know I am doing something
incredibly silly, but cannot find a solution.

As an example, I want to replace the spaces in a date with '0'. I come
unstuck everytime I try to use }.

I try things like:
'0' ((I.@:=)&' ')} ' 5\ 3\2004'
|domain error
|   '0'    ((I.@:=)&' ')}' 5\ 3\2004'


 I know how to do it in steps:

   indices =. (I.@:=&' ') ' 5\ 3\2004'
   '0' indices} ' 5\ 3\2004'
05\03\2004

but want to know how to use it in one go like: '0' ((I.@:=)&' ')} ' 5\
3\2004'

I am thinking (wrongly)  that  ((I.@:=)&' ')} prduces a dyad which
evaluates as  x ( ((I.@:=)&' ') y)} y.

Thanks,
Matthew.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to