[back] [prev] [next] [index] [root]

 


ECHOon

Switches the output of stdout to a file.

Syntax:

ECHOon ( name \| file [, arg] );

string
  name  
filename to write to
file
  file  
open for writing
expression
  arg  
should produce an output to stdout

See also:  ECHOoff

Description:

Changes the output stream to output in a file. Note that it is dangerous if an error occurs, because you will not be able to see most of the kash messages. It is advisable to use it only in the form: \begin{center} ECHOon(file, arg); ECHOoff(); \end{center} because now kash will change back to normal behaviour even if an error occurs. ECHOoff switches the indirection off again. Note, that a call like \begin{center} ECHOon(file); \end{center} forces you to type all commands, including \begin{center} ECHOoff(); \end{center} without any echo on the screen. All output is redirected to file.


Example:

Debug information of an order maximal call.

kash> PRINTLEVEL ("ROUND2", 2);
2
kash> f := Open ("/tmp/dump","w");
Filename: /tmp/dump / Mode: w / Open (fid): 5
kash> ECHOon (f, OrderMaximal (Order (x^5 + 5*x^3 + 16*x^2 - 6*x + 38)));
   F[1]
    |
   F[2]
  /
 /
Q
F  [ 1]     Given by transformation matrix
F  [ 2]     x^5 + 5*x^3 + 16*x^2 - 6*x + 38
Discriminant: 3828384 

kash> Exec ("cat /tmp/dump");
kash> Close (f);
true


<- back[back] [prev] [next] [index] [root]