Ah I see where the one comes from now.
This seems like better behaviour than just
signalling domain error as in the standard.
Works as intended!

Thanks,
Louis

> On 26 Jun 2016, at 11:18, Juergen Sauermann <[email protected]> 
> wrote:
> 
> Hi Louis,
> 
> the IBM APL2 reference p. 292 says:
> 
> Invalid Definition: If the definition is not valid, Z is a scalar integer 
> indicating the
> first row of the function or operator line in error. This integer is 
> dependent on ⎕IO.
> 
> I believe the equivalence mentioned in the ISO standard is only valid when the
> function definition C is valid.
> 
> /// Jürgen
> 
> 
> On 06/26/2016 03:04 AM, Louis de Forcrand wrote:
>> I've been browsing through the system functions in the standard,
>> and found a (somewhat negligible) inconsistency in GNU APL's
>> implementation of monadic ⎕FX.
>> 
>> Shouldn't this use of ⎕FX:
>> - define a monad TEST
>> - return 'TEST'
>> ?
>> 
>>       )CLEAR
>> CLEAR WS
>>       ⎕FX ⊃'∇Z←TEST X' '⎕←"hi"' 'Z←X∇'
>> 1
>>       )FNS
>>       TEST 5
>> VALUE ERROR
>>       TEST 5
>>       ^
>>       
>> Clearly ⎕CR ⎕FX C yields an error as well, while the standard
>> states that it should be equivalent to C (which is a well-formed
>> character matrix) on page 203. In addition, AFAIK GNU APL's
>> ⎕FX returns 1 no matter what I feed it. Maybe my character
>> matrix is ill-formed?
>> Yes, I should remove the del characters. Then ⎕FX works as
>> described in the standard, except when it should signal errors.
>> Unless the returned 1 is intended behaviour?
>> 
>> 
>> Thanks,
>> Louis
>> 
> 

Reply via email to