bug-apl
[Top][All Lists]
Advanced

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

Re: )copy used in apl script fails to recognize commented closing ⍝∇


From: Dr . Jürgen Sauermann
Subject: Re: )copy used in apl script fails to recognize commented closing ⍝∇
Date: Fri, 24 Mar 2023 12:37:13 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0

On 3/23/23 22:12, enztec@gmx.com wrote:
when using )copy in an apl ws (see attached fns.apl) or as an apl script (./fns.apl or apl fns.apl)

the ⍝∇ in fns f1 is treated as a ∇ and should give the same results as if it was not there
No.

starts  a comment and closes the ∇editor. After that:

∇f1[⎕]∇
      ∇f1[⎕]∇
    ∇
[0]   f1
[1]    1
[2]  ⍝
    ∇

If you omit ⍝∇ then

(1) it will not go into the body of f1, and
(2) the ∇-editor will remain open.

The subsequent ∇f2 is not a valid ∇-editor command (only
a stand-alone ∇ closes a function), therefore the line is
passed on to the tokenizer. Which then complains because
is not a valid APL token:
so now if you actually delete the f1 ⍝∇ you get the syntax error

SYNTAX ERROR+
Tokenizer: No token for Unicode U+2207 (∇)
Input: ∇f2

which is also the same error when running )copy in libapl with the apl_exec("∇f1"); line

enztec


reply via email to

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