I tried belisarius' answer using WriteString
, but it just prints plain text, and you can't print, for example x2. Instead you have to print x^2 which is not cool for reading.
I found a way using Google and Mathematica's help. The main thing I was missing was that under each command found in the help of Mathematica you have "More Information" image which if clicked shows more info about the command. For the Print
command, it says that Print
uses the Row
which is what I use for my solution.
The idea is to create a list. We can do it for example with the command myArray = Range[2];
. Then instead of printing what we want to print we will add it in the list myArray[[1]] = "First thing to print";
. When we are ready and want to print all we just call the Row[myArray]
command which will concatenate the elements of the list and print them with a newline at the end of the concatenated elements.
Here is your solution:
myArray = Range[2];
myArray[[1]] = "first part of the result " DateString[];
myArray[[2]] = " addition to the result " DateString[];
Row[myArray]
PrintTemporary
useful: the printed stuff disappears when the computation is over. $\endgroup$