Journaling provides a record of an interactive session by saving in a file all text entered from the terminal in response to a prompt. In journaling, all text entered to the IDL prompt is entered directly into the file, and any text entered from the terminal in response to any other input request (such as with the READ procedure) is entered as a comment. The result is a file that contains a complete description of the IDL session.
JOURNAL has the form:
JOURNAL[, Argument]
where Argument is either a filename (if journaling is not currently in progress) or an expression to be written to the file (if journaling is active).
The first call to JOURNAL starts the logging process. If no argument is supplied, a journal file named idlsave.pro is started.
| Warning |
When journaling is not in progress, the value of the system variable
JOURNAL,
is equivalent to
PRINTF,!JOURNAL, Argument
with one significant difference-the JOURNAL statement is not logged to the file, only its output; while the PRINTF statement will be logged to the file in addition to its output.
Journaling ends when the JOURNAL procedure is called again without an argument or when IDL is exited. The resulting file serves as a record of the interactive session that went on while journaling was active. It can be used later as an IDL batch input file to repeat the session, and it can be edited with any text editor if changes are necessary.