Re: [Jprogramming] Item amend with empty items

2019-09-12 Thread R.E. Boss
Thanks, I've should have noticed myself.


R.E. Boss


> -Oorspronkelijk bericht-
> Van: Programming 
> Namens Henry Rich
> Verzonden: donderdag 12 september 2019 14:38
> Aan: programm...@jsoftware.com
> Onderwerp: Re: [Jprogramming] Item amend with empty items
> 
> x must have the shape of a cell of m{y.
> 
>     ($0)(2 3 5)} i.10
> 
> The shape of x is ,0; the shape of m{y is ,3.  Length error.
> 
>     99 (2 3 5)} i. 10
> 0 1 99 99 4 99 6 7 8 9
> 
> The shape of x is ''; the shape of m{y is ,3.  Happiness.
> 
> You made a little error when you typed $$a:.  If you had typed $a:
> instead you would have seen the difference.
> 
> Henry Rich
> 
> 
> 
> 
> 
> On 9/12/2019 5:24 AM, R.E. Boss wrote:
> > ($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
> 
> 
> ---
> This email has been checked for viruses by AVG.
> https://www.avg.com
> 
> --
> For information about J forums see http://www.jsoftware.com/forums.htm
--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] Item amend with empty items

2019-09-12 Thread David Lambert

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 +
From: "R.E. Boss"
To:"programm...@jsoftware.com"  
Subject: [Jprogramming] Item amend with empty items
Message-ID:



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


Re: [Jprogramming] Item amend with empty items

2019-09-12 Thread Henry Rich

x must have the shape of a cell of m{y.

   ($0)(2 3 5)} i.10

The shape of x is ,0; the shape of m{y is ,3.  Length error.

   99 (2 3 5)} i. 10
0 1 99 99 4 99 6 7 8 9

The shape of x is ''; the shape of m{y is ,3.  Happiness.

You made a little error when you typed $$a:.  If you had typed $a: 
instead you would have seen the difference.


Henry Rich





On 9/12/2019 5:24 AM, R.E. Boss wrote:

($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



---
This email has been checked for viruses by AVG.
https://www.avg.com

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