On 3/14/23 6:46 PM, enz...@gmx.com wrote:
I asked you for what code to use for your changes and you referred me to info
libapl like i would know you added something to libapl
when I inform you that I have added functions to libapl then you
might conclude that the documentation of libapl has changed.
what code specifically do you want me test?
the code in my last email. Attached again.
On Tue, 14 Mar 2023 13:21:21 +0100
Dr. Jürgen Sauermann <m...@xn--jrgen-sauermann-zvb.de> wrote:
On 3/13/23 10:50 PM, enz...@gmx.com wrote:
Jürgen
your code change didn't fix my problem and actually broke my workaround
I am sorry to hear that. I have no idea though what the purpose of your
workaround actually is. work around which problem? Your initial issue
was the lack of a way to define APL functions, which is fixed now.
please test agains my code okay ?
No. please test my code and let me know precisely why it does
not fix your problem.
enztec
#include <stdio.h>
#include <apl/libapl.h>
/* compile with:
gcc libapl_test.c -L /usr/local/lib/apl -lapl -lstdc++ -o libapl_test
*/
int
main(int argc, char * argv[])
{
init_libapl(argv[0], 0);
apl_exec( "⎕FX 'Z←A SUM B' 'Z←A + B'");
printf(")FNS → %s", apl_command( ")FNS"));
apl_exec( "'⎕CR SUM:' (⎕CR 'SUM')" );
apl_exec( "1 SUM 2" );
const char * foo[] = { "Z←A FOO B", "Z←A SUM B", NULL };
fix_function(foo);
const char * bar = "Z←A BAR B\n" "Z←A SUM B\n";
fix_function_NL(bar);
printf(")FNS → %s", apl_command( ")FNS"));
apl_exec( "⎕CR 'FOO'" );
apl_exec( "⎕CR 'BAR'" );
}