[Jprogramming] verb to set an element of an array
Schmidt-Gröttrup, Markus
M.Schmidt-Groettrup at hs-osnabrueck.de
Fri Jun 23 10:17:02 UTC 2017
Try
put =: 4 : '42 (x)}y'
verb is defined as 3, meaning a monadic verb, but a dyadic verb is needed.
Best regards,
Markus
-----Ursprüngliche Nachricht-----
Von: Programming [mailto:programming-bounces at forums.jsoftware.com] Im Auftrag von Rudolf Sykora
Gesendet: Freitag, 23. Juni 2017 11:24
An: programming at jsoftware.com
Betreff: [Jprogramming] verb to set an element of an array
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