bug-apl
[Top][All Lists]
Advanced

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

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


From: David B. Lamkins
Subject: [Bug-apl] ⎕EC return values are incorrect for user-defined errors
Date: Sat, 31 May 2014 10:51:25 -0700

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]