up previous next
OpenLog

open a log of a CoCoA session
Syntax

OpenLog(D:DEVICE):NULL


Description
This function opens the output device D and starts to record the output from a CoCoA session on D. The CloseLog closes the device D and stops recording the CoCoA session on D.

At present the choices for the device D are an output file (see OpenOFile ) or an output string (see OpenOString ). Several output devices may be open at a time. If the panel option Echo is set to TRUE, both the input and output of the CoCoA session are logged; otherwise, just the output is logged.

Example
  D := OpenOFile("MySession");
  OpenLog(D);
  1+1;
2
-------------------------------
  G := 1;
  Set Echo;
  2+2;
2 + 2
4
-------------------------------
  F := 2;
F := 2
  CloseLog(D);
CloseLog(D)
  UnSet Echo;
SET(Echo, FALSE)

-- The contents of "MySession":
2
-------------------------------
2 + 2
4
-------------------------------
F := 2
CloseLog(D)


See Also