[Jprogramming] verb to set an element of an array

Björn Helgason gosinn at gmail.com
Fri Jun 23 11:12:53 UTC 2017


put=: 4 : '42 x}y'
   1 put 1 2 3
1 42 3


On 23 Jun 2017 09:23, "Rudolf Sykora" <rudolf.sykora at gmail.com> wrote:

Hello,

I want to set x'th element of y to 42.
I tried quite a few variations of

put := verb : '42 x}y'

but I am still getting

1 put 1 2 3
|domain error: put

Can you tell me what is wrong, and tell me how to do it right?

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


More information about the Programming mailing list