
protocol - protocol of a MuPAD session

Calling sequence:
protocol()
protocol(integer)
protocol(string)

Parameter:
integer   --  positive integer
string    --  character string

Summary:

protocol returns a protocol of all input and output of a MuPAD session in
a text file. The file can be specified by its name or through a file descriptor:

 o  If a positive integer integer is given as the first argument then this is
    considered the file descriptor. The relevant file must already have been
    opened with fopen as a text file for writing.

 o  If a character string is given with the argument string then the file
    with this name is opened. If this file does not already exist then a new
    one with this name is created. If there is any data in this file then it is
    overwritten in this modus.

     If protocol is called in MacMuPAD on the interactive level then the
     user is warned before the file is overwritten. The operation can then be
     terminated.

     If the variable WRITE_PATH  has a value then the file is created in the
     given directory, in all other cases it is created in the current directory.
     (This is the directory in which MuPAD was started.)

  o  If, in MacMuPAD, an empty character string is given with the argument
     string then a dialogue is opened in which the user can choose a file.

If a new protocol is started while a protocol is running then the old one
is terminated and the relevant file is closed.  A call of protocol without
parameters terminates a running protocol and closes the relevant file.  If
the protocol file is closed with fclose then the protocol is also terminated.
protocol is a kernel function.

>>  protocol("test-protocol");

See also:  fclose , fopen , fprint , write

