OOF2: The Manual
Name
Output Stream (OutputStream) — Send output to a file.
Synopsis
OutputStream
(filename
,mode
)
Details
-
Base class:
OutputDestination
-
Parameters:
filename
- Type: A character string.
mode
- Whether to write or append to the file. Type: An object from the
WriteMode
enumerated class.
Description
OutputStream
is the OutputDestination that sends data from a
Scheduled
Output to a file. OutputDestinations are assigned to ScheduledOutputs by the Scheduled Output page
and the OOF.Mesh.Scheduled_Output.Destination.Set
command.
If mode
is w
, the file
will be opened for writing, and any existing file contents will be
overwritten. If mode
is
a
, the file will be opened for appending, and
the new data will appear at the end. Note that if the file is ever
rewound,
all data in the file will be overwritten even if the file had been
opened for appending.
The output file will begin with a header containing comments describing the source of the data and the contents of each column. The characters demarcating the comments and dividing the columns can be selected in the OOF.Settings.Output_Formatting menu in the main OOF2 menubar.
More than one ScheduledOutput can
use the same OutputStream
.[30]
In that case, the file's mode
is the last one
assigned. The data from the various ScheduledOutputs will be interleaved in
the file, but each type of data will be preceded by comments
identifying it.
[30]
The class is called OutputStream
instead of
OutputFile
to emphasize the fact that two
streams can refer to the same file.