bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] ⎕EC return values are incorrect for user-defined errors


From: Juergen Sauermann
Subject: Re: [Bug-apl] ⎕EC return values are incorrect for user-defined errors
Date: Sun, 01 Jun 2014 18:53:15 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5

Hi David,

thanks, fixed in SVN 306.

/// Jürgen


On 05/31/2014 07:51 PM, David B. Lamkins wrote:
See the IBM Reference, page 280, paragraph 3.

When ⎕EC executes an expression that signals a user-defined error, the
second and third items of the result should be the same as the
expression's ⎕ET (which would be 0 1 in this case) and ⎕EM. GNU APL
returns 0 0 and 'User defined error'.

Note also that ⎕ET must not be changed by ⎕EC. GNU APL already does this
correctly.

It's not clear from the IBM Reference whether ⎕EM should also not be
changed by ⎕EC. It seems reasonable to assume that *not* changing ⎕EM is
the correct behavior; the whole point of ⎕EC is to execute an expression
in a controlled manner. If so, GNU APL is already correct in this
regard.


       ⎕es 'foo'
foo
       ⎕ES 'foo'
       ^
       ⎕em
foo
       ⎕ES 'foo'
       ^
       ⎕et
0 1
       ⎕ec '⎕es ''foo'''
  0  0 0  User defined error
       ⎕em










reply via email to

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