I've been seeing syntax errors being thrown on functions copied from
another workspace. I've imported Blake McBride's APL editor from his
GitHub site (linked to by the GNU APL Community pages). It seems to
be reasonably up to date.
Once I have the workspace created containing the editor application,
I )SAVE it. I then create a new workspace and )COPY the functions in
the editor workspace into my current workspace. Then I attempt to
use it to edit a function (an alternative to the ∇ editor).
What I see is that the copied editor function will fail with a
syntax error on branch statements within the function:
)copy Editor
SAVED 2025-01-19 15:03:52 (GMT-5)
E∆Edit 'asd'
At all prompts you can type 'end' to exit or backup to the previous
question.
You can often type 'help' to get help.
Enter the line numbers you wish to change, or [a,b,r]? 2
SYNTAX ERROR
E∆Piv[18] →(0=⍴t)/0
^^
However, if you look at the variables involved, there should be
nothing that should cause this syntax error
t
2
⍴t
1
0=⍴t
0
0/0
⍴0/0
0
The strange thing about this is that if I open the offending
function in the ∇ editor and save it (making no changes), the error
goes away... at least for that function:
)si
∇E∆Piv
[51] ∇
E∆Edit 'asd'
At all prompts you can type 'end' to exit or backup to the previous
question.
You can often type 'help' to get help.
Enter your edit command? edit
Enter the line numbers you wish to change, or [a,b,r]? 2
24
Enter your edit command? end
SYNTAX ERROR
E∆Edit[31] →(2↑bv←qq E∆Pim 'Enter your edit command')/31 34
^^
As you can see, another function is exhibiting the same error. Like
the E∆Piv function, opening the E∆Edit function seems to "fix"the issue.
What doesn't seem fix the issue is using ⎕CR and ⎕FX as an
alternative to the ∇ editor.
)reset
⎕FX ⎕CR 'E∆Edit'
E∆Edit
E∆Edit 'asd'
At all prompts you can type 'end' to exit or backup to the previous
question.
You can often type 'help' to get help.
Enter your edit command? edit
Enter the line numbers you wish to change, or [a,b,r]? 2
24
Enter your edit command? end
SYNTAX ERROR
E∆Edit[31] →(2↑bv←qq E∆Pim 'Enter your edit command')/31 34
^^
As you can see, that didn't fix the problem. Now open E∆Edit with
the ∇ editor and see what happens:
)reset
∇E∆Edit
[41] ∇
E∆Edit 'asd'
At all prompts you can type 'end' to exit or backup to the previous
question.
You can often type 'help' to get help.
Enter your edit command? edit
Enter the line numbers you wish to change, or [a,b,r]? 2
24
Enter your edit command? end
As I said, this is very strange behavior. I can work around it, but
quite honestly it's a pain because I have no idea when the issue is
going to crop up again.
- Paul Rockwell