bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] Restrictions on localization of system variables?


From: Juergen Sauermann
Subject: Re: [Bug-apl] Restrictions on localization of system variables?
Date: Thu, 29 May 2014 13:00:29 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5

Hi Kacper,

I believe it is OK to do something useful when otherwise you would have
to raise an error. Most extensions work like that, e.g. dyadic ⎕CR, ⍬.
And we have seen that even ISO isn't always right.

/// Jürgen

On 05/27/2014 06:30 PM, Kacper Gutowski wrote:
On 2014-05-27 18:06:06, Juergen Sauermann wrote:
Note that there are some subtle differences between IBM APL2 and GNU APL
when localizing ⎕-vars. In IBM APL2 they are undefined after localizing
them.
In GNU APL they are pre-initialized with their respective default values.
This
gives simpler (and therefore faster code) because no check for validity is
needed
for the variables themselves, but also for the many internal users of them.
This indeed makes things simpler and I like the idea, but APL2's behavior
is mandated by ISO 13751 which at the beginning of chapter 12 says:

Note: When a system-variable-symbol is localised the initial class of
its associated system-parameter is nil.  If a primitive operation is
invoked that requires a system parameter whose class is currently nil,
the primitive operation signals implicit-error.  Therefore, a
conforming-program that localises system-variable-symbols should
assign them values from their internal-value-set before calling
primitive operations that require them.

-k





reply via email to

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