apl_exec() can output to both stdout and stderr. I use:
std::stringstream outbuffer; std::streambuf *coutbuf = std::cout.rdbuf(); std::cout.rdbuf(outbuffer.rdbuf()); std::stringstream errbuffer; std::streambuf *cerrbuf = std::cerr.rdbuf(); std::cerr.rdbuf(errbuffer.rdbuf()); execerr = apl_exec (cmd.toStdString ().c_str ()); std::cout.rdbuf(coutbuf); std::cerr.rdbuf(cerrbuf); outString = QString (outbuffer.str ().c_str ()); errString = QString (errbuffer.str ().c_str ()); On 7/24/22 16:12, [email protected] wrote:
hello
What does libapl output?- the apl_exec function returns 0 to stdout but what is
the actual display?
for example apl_exec('⍳20') what/where is the 1 to 20 displayed so it can be
captured?
thanks
OpenPGP_0xDA6C01938888083E.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature
