The empty item changes the vector length and so is not permitted.

a: on the other hand doesn't change the list length.

And this gives the idea that if you want to change the list length do the operation under (atomic box).  Box the items first, amend, then raze.

By gum it works!

   a:(2 3 5)} ;/i.10
┌─┬─┬┬┬─┬┬─┬─┬─┬─┐
│0│1│││4││6│7│8│9│
└─┴─┴┴┴─┴┴─┴─┴─┴─┘
   ; a:(2 3 5)} ;/i.10
0 1 4 6 7 8 9

Date: Thu, 12 Sep 2019 09:24:30 +0000
From: "R.E. Boss"<r.e.b...@outlook.com>
To:"programm...@jsoftware.com"  <programm...@jsoftware.com>
Subject: [Jprogramming] Item amend with empty items
Message-ID:
        
<vi1pr08mb44134a23fa4dc8b74f32918cc6...@vi1pr08mb4413.eurprd08.prod.outlook.com>
        
Content-Type: text/plain; charset="utf-8"

    ($0)(2 3 5)} i.10
|length error
|   ($0)    (2 3 5)}i.10

Probably beacause 0=$$0

    a:(2 3 5)} ;/i.10
+-+-+++-++-+-+-+-+
|0|1|||4||6|7|8|9|
+-+-+++-++-+-+-+-+

    $$a:
0

Why the difference?
Important, since amend in place not possible in second case.


R.E. Boss
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to