ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
Generate and return the iostat
code resulting from writing the input table
of rank 1
or 2
to the specified output.
More...
Generate and return the iostat
code resulting from writing the input table
of rank 1
or 2
to the specified output.
[in] | file | : The input scalar character of default kind SK representing the path to the external file to which the table must be written.If the specified file does not exist, it will be created.If it exists or is already connected, it will repositioned before the beginning of its first record. (optional. It must be present only if the input argument unit is missing.) |
[in] | unit | : The input scalar integer of default kind IK representing the preconnected (opened) file unit to which the table must be written.The writing will begin from the current file position plus the input roff .To write to stdout, use iso_fortran_env, only: unit => output_unit .(optional. It must be present only if the input argument file is missing.) |
[in] | table | : The input array of shape (:) or (:,:) of either
table to write to the specified output.By default a table of rank 1 is considered to be a single column unless the input optional argument operation is set to trans in which case table is considered as a row of fields.By default, if the input argument operation is missing, each column of table corresponds to each column of data in the file. |
[in] | operation | : The input scalar constant that can be:
table must be output as is.) |
[in] | header | : The input scalar character of default kind SK of arbitrary length type parameter containing the table header.It is recommended to delimit the header fields with the same input separator sep to this generic interface to minimize difficulties with reading the table in the future.(optional, If missing, no header will be written to the specified output. The generic interface setSplit() can be used to readily generate a array of header field containers split at by the user-specified separator.) |
[in] | sep | : The input scalar character of default kind SK of arbitrary length type parameter containing the separator of the fields of each of row of the table in the output file.(optional, default = , corresponding to an output CSV file.) |
[in] | deliml | : The input scalar of type character of default kind SK, of arbitrary length type parameter, containing the left-delimiter to be used for delimiting (quoting) the left-side of the elements of table in the output file.The symbols \(\texttt{"}\) and \(\texttt{'}\) are the two most popular quotation mark choices that are recognized by both CSV and Fortran list-directed output forms. Unless there is a good reason, the use of delimiters for table of type other than character is not advised.(optional. default = delimr or if missing, no left-delimiter will be used.) |
[in] | delimr | : The input scalar of type character of default kind SK, of arbitrary length type parameter, containing the right-delimiter to be used for delimiting (quoting) the right-side of the elements of table in the output file.The symbols \(\texttt{"}\) and \(\texttt{'}\) are the two most popular quotation mark choices that are recognized by both CSV and Fortran list-directed output forms. Unless there is a good reason, the use of delimiters for table of type other than character is not advised.(optional. default = deliml or if missing, no right-delimiter will be used.) |
[in] | roff | : The input scalar integer of default kind IK representing the row offset, that is, the number of rows in the external file or unit to skip before beginning to read the output variables header and table .(optional. default = 0 ) |
[in,out] | iomsg | : The input/output scalar character of default kind SK containing the error message, if any error occurs.A length type parameter value of LEN_IOMSG is generally sufficient for iomsg to contain the output error messages.(optional. If missing, no information other than the output error code err will be returned.) |
err
: The output scalar integer
of default kind IK containing the iostat
error code returned by the Fortran intrinsic write()
statement.err
is set to 0
if and only if the table
is successfully written to the output.err
.
Possible calling interfaces ⛓
isOpen(unit)
must hold for the corresponding input arguments.CHECK_ENABLED=1
.impure
.
Example usage ⛓
ifort
compiler ⛓ ifort
compiler ⛓ gfortran
compiler ⛓
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.