[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libapl question
Re: libapl question
Fri, 1 Jan 2021 09:19:32 -0500
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0
Many thanks for the quick fix.
As to the ⍎ issue, I'm using libapl in
a limited context as an embedded _expression_ evaluator and not as a
full-fledged APL environment, so maybe the issue won't bite me. I
expect I'll find out later today.
On 1/1/21 7:24 AM, Dr. Jürgen Sauermann
fixed in SVN 1400.
However, please note the following:
In GNU APL, you may, in principle, execute commands with ⍎ which
is a non-standard
APL extension. I have tested your case with both ⍎')LOAD
instead of libapl. The first test failed while
the second case succeeded.
The reason why the first case failed was because ⍎ of commands is
allowed for commands that do not modify the )SI stack
hell would brake loose). Now, )LOAD modifies the )SI
stack while )COPY
does not. Since not allowing )LOAD would be somewhat
is not entirely rejected, but does an automatic )SIC
before it is being executed.
This )SIC is necessary (since after it a )LOAD does no longer
modify the )SI stack)
but invisible to the user. As a consequence, the result of an
Q←⍎')LOAD wsname' gets lost because an error
occurs before the assignment takes place
and right after the error the )SI stack is cleared
(which hides the error from the user).
I suppose that libapl behaves somewhat differently
because it performs the command
directly instead of using ⍎, but the problem remains the same.
The assignment of the
)LOAD command output is done in the old workspace which is
the )LOAD proceeds and may therefore be lost. The
commands which do an automatic
)SIC are: )LOAD, )QLOAD, )CLEAR
(aka. )RESET) and )SIC.
On 12/31/20 8:59 PM, Chris Moller wrote:
Being some combination of sadistic and
masochistic, I'm trying to use the libapl library using the
/// Pass `command`
to the command processor and return its output.
but when I do
extern const char * apl_command(const char *
const char *rc =
apl_command (")load workspace");
2020-12-30 17:18:13 (GMT-4)
to stdout and rc is empty.
Am I doing something wrong, or am I trying to do something APL
was never intended to do? I'd like to be able to capture
everything libapl says and not have it go to stdout/stderr.