Dissect is good for sentences like this.
Henry Rich
On 12/8/2021 7:42 AM, Aaron Ash wrote:
Ah that makes sense, thanks!
On Wed, Dec 8, 2021 at 10:39 PM Hauke Rehr <[email protected]> wrote:
You’re creating a list
$ a
1
not an atom
$ 1
(there is an empty line)
you can see it this way
a = 1
1
a -: 1
0
so you try to compare a list with 1 element to one element
that rhs element gets repeated 1 times (because there are
1 elements in a), and that works
but if you try to compare lists of unlike lengths you get
an error that actually tells you exactly that: length error
a = 1 0 1
is equivalent to
(, 1) = 1 0 1
datatypes don’t matter
$ 'a'
] l1 =. (,1) { 'ab'
a
$ l1
1
'a' = 'abc'
1 0 0
l1 = 'abc'
<same error>
Am 08.12.21 um 13:25 schrieb Aaron Ash:
Hi All,
I've just noticed some strange behavior comparing an integer to a boolean array.
JVERSION
Engine: j902/j64avx2/linux
Release-b: commercial/2021-02-18T11:52:47
Library: 9.02.08
Qt IDE: 1.9.2/5.9.5(5.15.2)
Platform: Linux 64
Installer: J902 install
InstallPath: /home/aaron/Downloads/j902
Contact: www.jsoftware.com
a=:I.0 1
a = 1
1
a = 1 0 1
|length error
| a =1 0 1
datatype a
integer
$a
1
I can also replicate it in JVERSION 9.03.08.
What's going on here?
Cheers,
Aaron.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
----------------------
mail written using NEO
neo-layout.org
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
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