CoCoA:OpenLog
From ApCoCoAWiki
OpenLog
open a log of a CoCoA session
Description
This function opens the output device D and starts to record the
output from a CoCoA session on D. The <ttref>CloseLog</ttref> 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
<ttref>OpenOFile</ttref>) or an output string (see <ttref>OpenOString</ttref>). 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(<quotes>MySession</quotes>); 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 <quotes>MySession</quotes>: 2 ------------------------------- 2 + 2 4 ------------------------------- F := 2 CloseLog(D)
Syntax
OpenLog(D:DEVICE):NULL
<type>io</type> <type>printing</type>