bug-apl
[Top][All Lists]
Advanced

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

Re: ]pushfile hang


From: Dr . Jürgen Sauermann
Subject: Re: ]pushfile hang
Date: Mon, 21 Jun 2021 14:03:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Hi,

you should be aware that ]PUSHFILE puts you into a new immediate
execution context, just like an error does in normal APL execution.
Unlike the immediate execution after an APL error, you cannot or
should not leave it with  → or →N but only with ]NEXTFILE.

When you think it hangs, then most likely it only expects more input
(and carriage return should give you a new APL prompt).

The new immediate execution context is not meant to do
complicated things, but rather to fix simple problems like
VALUE ERRORs.

In theory you can )COPY workspaces, but that requires a deep
understanding of what is happening under the hood (and the
behaviour differs between )COPYd .apl and .xml files).

Note also that you cannot )COPY the same (script-) file twice because
that would  cause an infinite recursion and therefore GNU APL refuses
to do so.

Best Regards,
Jürgen


On 6/21/21 2:13 AM, enztec@gmx.com wrote:
Hi

2 situations i encountered using ]pushfule and a code request :

---


when i use the ]pushfile in a script or in a ws fns or in a file i )copy into the ws

the next time i do a )copy (on a different file)  it hangs until i do a carriage return but the next )copy still hangs.

the only way to stop the )copy hang is with a ]nextfile or ^C then it returns to normal until the next ]pushfile

---

and if i )copy on the same file that had the original ]pushfile in it - it gives the error/warning

error from Workspace.cc around line 749 (and doesn't copy the file)

if i comment the return it allows the )copy (and doesn't seem to cause any harm and takes care of my immediae need to edit the file and copy it back into the ws)

Workspace.cc aounr line 749
        if (filename == InputFile::files_todo[f].filename)   // same filename
           {
             CERR << "*** )COPY " << filename
                  << " would cause recursion (NOT COPIED)" << endl;
//             return;      <--- commenting allows file to be copied
           }
      }

code request :

would it be possible to add another/separate   ]pusfile_kill    cmd (in addition to ]pushfile) that just ends the script and doesn't have the ability to need/use a ]nextfile?

so even if there are 5 ]pushfiles in a file - only the first one hit stops the execution and any more ]nextfile gives the no more file warning


Thank you






reply via email to

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