bug-apl
[Top][All Lists]
Advanced

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

Re: )DUMP entry with syntax error


From: Dr . Jürgen Sauermann
Subject: Re: )DUMP entry with syntax error
Date: Thu, 3 Dec 2020 20:09:00 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Hi,

fixed in SVN 1368.

If you have old workspaces )DUMPed with the error, then they can be maually
fixed by adding a ⍬ after the IO+ in the line(s) complaining with SYNTAX error,

In your example: replace

    ((⎕IO+)⊃X)←'XXX'

with:

    ((⎕IO+⍬)⊃X)←'XXX'

For vi fans: the following single command should do the job for one .apl file:

:1,$s/⎕IO+)/⎕IO+⍬)/g

And this sed command will probably do it for all broken .apl files below directory <dir>:

find <dir> -exec sed -i 's/IO+)/⎕IO+⍬)/g' {} \;

Please note that the character to be inserted is
(Zilde) and not 0 (Zero); the
difference is difficult to see with some fonts.

Best Regards,
Jürgen


On 12/3/20 6:35 PM, Hans-Peter Sorge wrote:
Hi,

a short test gives:

$ apl -q
      X←⊂'XXX'
      )WSID DUMP_TEST
WAS CLEAR WS
      )DUMP
2020-12-03  18:20:00 (GMT+1)
      )OFF


     )load DUMP_TEST.apl
DUMPED 2020-12-03  18:20:00 (GMT+1)
SYNTAX ERROR
      ((⎕IO+)⊃X)←'XXX'
      ^         ^

$ less DUMP_TEST.apl
.....
X←00
    ((⎕IO+)⊃X)←'XXX'
.....

should be
X←⊂¨,0
    ((⎕IO+0)⊃X)←'XXX'

or even just
X←⊂'XXX'


Best Regards
Hans-Peter


reply via email to

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