bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Index-of function with structured left-argument


From: Dr . Jürgen Sauermann
Subject: Re: Index-of function with structured left-argument
Date: Tue, 14 Apr 2020 11:39:15 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Hi Elias,

my best guess is that this is a missing RANK ERROR somewhere.
I will look into it.

Best Regards,
Jürgen


On 4/14/20 10:15 AM, Elias Mårtenson wrote:
The ISO spec doesn't address what the index-of function should do when the left argument is not a scalar or a one-dimensional array.

GNU APL extends this, but I don't really understand in what way. How am I to interpret the output from this?

      (2 2 ⍴ 104 105 106 107) ⍳ (3 4 ⍴ 100+⍳100)
┏→━━━━━━━━━━━━━━━━━━━━━━┓
↓┏⊖┓   ┏⊖┓   ┏⊖┓   ┏⊖┓  ┃
┃┃0┃   ┃0┃   ┃0┃   ┃0┃  ┃
┃┗━┛   ┗━┛   ┗━┛   ┗━┛  ┃
┃┏→━━┓ ┏→━━┓ ┏→━━┓ ┏→━━┓┃
┃┃0 0┃ ┃0 1┃ ┃1 0┃ ┃1 1┃┃
┃┗━━━┛ ┗━━━┛ ┗━━━┛ ┗━━━┛┃
┃┏⊖┓   ┏⊖┓   ┏⊖┓   ┏⊖┓  ┃
┃┃0┃   ┃0┃   ┃0┃   ┃0┃  ┃
┃┗━┛   ┗━┛   ┗━┛   ┗━┛  ┃
┗∊━━━━━━━━━━━━━━━━━━━━━━┛

Regards,
Elias


reply via email to

[Prev in Thread] Current Thread [Next in Thread]