Hi Elias,

you cannot define a niladic function with axis because you could not call it. There is no reduction pattern defined for that - not in ISO and not in IBM APL2.
N[X] computes N and then indexes it with X and does not call N with axis X.

The other problem was a missing check for valid function headers - *{ ⍶ χ }*
would be a niladic operator (which also does not exist). SVN 396 now issues
a syntax error when you try to define it.

/// Jürgen


On 07/25/2014 07:47 AM, Elias Mårtenson wrote:
I'm getting an error declaring a nihilic operator that has an index parameter using ⎕FX:

*      ⎕FX 'Z←(OP F)[V]' "OP V"*
1

When I declare it using the lambda format, the declaration works but trying to call it gives an error. Trying to call it without the index parameter (but with a normal parameter) causes a crash:

*      FF ← { ⍶ χ }*
*      -FF[10]*
SYNTAX ERROR
*     -FF 10*


====================================================
SEGMENTATION FAULT

----------------------------------------
-- Stack trace at main.cc:140
----------------------------------------
0xa @@@@
0xa  @@@@
0xa   @@@@
0xa    @@@@
0xa     @@@@
0xa      @@@@
0xa       @@@@
0xa        @@@@
0xa         @@@@
0xa          @@@@
0x0           @@@@
0x0            @@@@
0xa             @@@@
========================================
====================================================

Regards,
Elias

Reply via email to