On 02/05/2019 11:37 PM, vvs wrote:Certainly not:On Tue, Feb 5, 2019 at 7:08 PM Dr. Jürgen Sauermann <mail@jürgen-sauermann.de> 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 ∇Z←A Z←42 ∇ At this point A has token class Niladic-Defined-Function-Name (page 25), An attempt to change that by: A←5 is therefore explicitly forbidden by the statement on page 67. It has always bin that way since the invention of APL. You need to )ERASE A (or → if A was localized) before you can change it from beiing a function to becoming a variable. And that is rather independent of whether assigning a function to a name is supported or not. This is different from the case where A is a function already: in that case one might allow assignment of a different function with the same signature even though that can also create pathological cases. 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. |
- Re: [Bug-apl] A few problems Dr . Jürgen Sauermann
- Re: [Bug-apl] A few problems vvs
- Re: [Bug-apl] A few problems Dr . Jürgen Sauermann
- Re: [Bug-apl] A few problems vvs
- Re: [Bug-apl] A few problems Dr . Jürgen Sauermann
- Re: [Bug-apl] A few problems vvs
- Re: [Bug-apl] A few probl... Dr . Jürgen Sauermann
- Re: [Bug-apl] A few probl... vvs
- Re: [Bug-apl] A few probl... Dr . Jürgen Sauermann
- Re: [Bug-apl] A few probl... vvs
- Re: [Bug-apl] A few probl... Dr . Jürgen Sauermann
- Re: [Bug-apl] A few probl... vvs
- Re: [Bug-apl] A few probl... Dr . Jürgen Sauermann
- Re: [Bug-apl] A few probl... vvs
- Re: [Bug-apl] A few probl... vvs
- Re: [Bug-apl] A few probl... Dr . Jürgen Sauermann
- Re: [Bug-apl] A few probl... Dr . Jürgen Sauermann
- Re: [Bug-apl] A few probl... vvs
- Re: [Bug-apl] A few probl... Bill Heagy
- Re: [Bug-apl] A few probl... Dr . Jürgen Sauermann