bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] A few problems


From: vvs
Subject: Re: [Bug-apl] A few problems
Date: Wed, 6 Feb 2019 00:37:44 +0200

On Tue, Feb 5, 2019 at 7:08 PM Dr. Jürgen Sauermann
<address@hidden> wrote:
> It also raises the following question:
>
> ∇Z←A
>  Z←42
>
>
> A←5
>
> A
>
> What is A and why so? And its is definitely not ISO which says (page 67):
> ...
> If V is a variable-name,
> If the current-class of V is nil or variable,
> Set the current-referent of V to a token whose class is variable and whose
> content is the content of B.
> Return a token whose class is committed-value and whose content is B.
> Otherwise, signal syntax-error.

I don't follow. For me A is clearly a variable-name, so its content is
5, i.e. B. This is what NARS2000 returns. Why it isn't ISO? BTW, ISO
doesn't even contains assignment to defined-function-name-token, but
only to variable-name-token. Do you mean that the class of a token has
changed and there should be a syntax-error? Yes, NARS2000 isn't
conforming by not signalling a syntax-error, but I believe that it's
just a bug and could be fixed. GNU APL in a very similar situation now
just hangs, i.e.:

∇Z←A
A←0
Z←A
∇
A←1

"Informal Description: Bind-token-class is used to bind each
identifier in current-
statement to its current syntactic-unit; if the class of a token
changes between this
point and the time the token is used (as it would for example in F
⎕EX'F' , assuming
F were initially a defined-function), the change will be detected and
reported as a
syntax-error in the appropriate phrase-evaluator."

Also, I think that this behavior is following from the NARS2000
extension which allows for modified assignment, e.g. A+←1 which means
A←A+1 (cf. C/C++ A += 1) and which would be ambiguous otherwise.



reply via email to

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