[GAP Forum] Changing line when printing to a text file

Hebert Pérez-Rosés hebert.perez at gmail.com
Fri Jan 31 09:25:22 GMT 2014


Hi all,

I am printing a function's output simultaneously to the standard output
(the screen) and to a text file. On the screen the output appears
correctly, but in the text file everything appears as a single line, i.e.
there is no change of line. Here's my code:

  LogOutputTo("C:/Tempo/GAP/outgraph.txt");
  Print(n, " ", m, "\n");
  for i in [1..m] do
      Print(out[i][1], " ", out[i][2], "\n");
  od;
  LogOutputTo();

What happens to the "\n" character?

Thank you very much in advance,
Hebert.


More information about the Forum mailing list