Hello,
sorry, the replies by Raymond and Robert from October 10 escaped me somehow:
Thanks!
I wrote now the function
/* Evaluate term t, and concatenate all print-output into one string: */
print2string('t) := block([S : make_string_output_stream()],
with_stdout(S,ev(t)),
get_output_stream_string(S))$
which collects all output of print into a string. That solves the
problem.
By the way, the reasons that the functions I had in mind do print, but
do not return a string, are:
- Some create very large files, with millions of lines.
- And some just print messages, besides the real output.
Thanks again for your help.
Oliver