OMG, to think I didn't even TRY that.
Thank you Henry!
On 8/19/23 10:50, Henry Rich wrote:
Look out, it's a trap!
7 2 is a single word (a 2-item list). You have to separate the numbers.
7 (2)} y
0 1 7 3 4
Henry Rich
On 8/19/2023 10:46 AM, 'PMA' via Programming wrote:
NB. Dear J gurus --
NB. I'm having trouble with x m} y
NB. Given a character array, it works:
y =: '01234'
y =: '7' 2} y
y
01734
NB. But with a numbers array, No:
y =: 0 1 2 3 4
y =: 7 2} y
|rank error
| y=: 7 2} y
y
0 1 2 3 4
NB. How can I fix this?
NB. Thanks in advance!
NB. Peter A.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm