![]() |
ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
Generate and return an object of type display_type. More...
Public Attributes | |
integer(IK), public | width = -huge(0_IK) |
The scalar integer of default kind IK containing the width of the runtime Shell screen or -huge(0_IK) if the inference fails or the display is not the standard output output_unit . More... | |
integer(IK), public | height = -huge(0_IK) |
The scalar integer of default kind IK containing the height of the runtime Shell screen or -huge(0_IK) if the inference fails or the display is not the standard output output_unit . More... | |
integer(IK), public | tmsize = 0_IK |
The scalar integer of default kind IK containing the number of records to skip on top of the current record. More... | |
integer(IK), public | count = 1_IK |
The scalar integer of default kind IK containing the number of times to repeat the current record. More... | |
integer(IK), public | bmsize = 0_IK |
The scalar integer of default kind IK containing the number of records to skip on the bottom of the current record. More... | |
integer(IK), public | unit = output_unit |
The scalar integer of default kind IK containing the unit number of the file to which the record must be written. More... | |
character(3, SK), public | advance = SK_"YES" |
The scalar character of default kind SK containing the default IO advance mode for reading/writing actions. More... | |
character(:, SK), allocatable, public | file |
The scalar character of default kind SK containing the file path to which the record must be written. More... | |
type(field_type), public | format |
The scalar character of default kind SK containing the default IO format with which the records should be displayed. More... | |
type(field_type), public | deliml |
The scalar object of type field_type containing the left-delimiters for objects of various types. More... | |
type(field_type), public | delimr |
The scalar object of type field_type containing the right-delimiters for objects of various types. More... | |
type(wrap_type), public | text |
The scalar of type wrap_type containing the runtime settings and a method to wrap strings within a fixed width. More... | |
type(mark_type), public | mark |
The scalar of type mark_type containing the runtime settings and a method to display remarks. More... | |
type(note_type), public | note |
The scalar of type note_type containing the runtime settings and a method to display notification messages. More... | |
type(warn_type), public | warn |
The scalar of type warn_type containing the runtime settings and a method to display warning messages. More... | |
type(stop_type), public | stop |
The scalar of type stop_type containing the runtime settings and a method to and stop the program and display program abortion messages. More... | |
Private Attributes | |
logical(LK) | sticky = .false._LK |
The scalar logical of default kind LK. If .true. the relevant properties of the current object can be later changed by its methods. More... | |
logical(LK) | uninit = .true._LK |
The scalar logical of default kind LK that is internally set to .false. once the object is constructed.The presence of this variable is to ensure seamless functioning of objects of display_type when the user forgets to call the type constructor. The constructor call is critical for setting the allocatable components. More... | |
Generate and return an object of type display_type.
The generated object can be used to show decorated string or other string values on the standard output or an optionally-specified external file.
[in] | file | : The input scalar of type character of default kind SK, containing the path to the unconnected external file to be opened and used as the display.
unit component of the output display object will be set to the unit of the connected file .(optional. It can be present only if the input argument unit is missing.) |
[in] | unit | : The input scalar integer of default kind IK representing the output display unit number where contents will be displayed.If the specified unit is not connected, it will be connected to a temporary file with status = "scratch" .(optional, default = output_unit . It can be present only if the input argument file is missing.) |
[in] | status | : The input scalar of type character of default kind SK, whose contents represent the status of the input file .It can take any value acceptable by the same argument to the Fortran intrinsic open() statement: "old" , "replace" , "new" , "unknown" , etc.(optional, default = SK_"old" if the input file is already opened, otherwise SK_"unknown" . It can be present only if the input argument file is also present.) |
[in] | position | : The input scalar of type character of default kind SK, whose contents represent the position of the input connected file .It can take any value acceptable by the same argument to the Fortran intrinsic open() statement: "asis" , "rewind" , "append" , etc.(optional, default = SK_"append" if the input file is already opened, otherwise SK_"asis" . It can be present only if the input argument file is also present.) |
[in] | advance | : The input scalar of type character of default kind SK, whose contents represent the default advance mode of the IO.The contents of advance are directly passed to the corresponding advance argument of the Fortran intrinsic read() or write procedures.(optional, default = \(\ms{SK_"YES"}\).) |
[in] | format | : The input scalar of type field_type, whose components represent the formats to be used for the output records of various intrinsic types. Note that the components of the input format are applied to each output record , that is, one output row.The components of format are directly used as the format argument of the Fortran intrinsic read() and write() statements.To simply the specification of mathematical display formats for complex values as in \(u + v\up{i}\), the complex component of the input object of type field_type can be also set to SK_"math" .In such a case, the math-style complex format FORMAT_GENERIC_DISPLAY_COMPLEX_MATH will be used for displaying complex valued objects.See also the generic interface getFormat for creating custom formats for objects of specific type and kind. (optional, default = \(\ms{"(sp,*(deliml,g0,', ',g0,delimr,:,', '))"}\) for complex fields and \(\ms{"(sp,*(deliml,g0,delimr,:,', '))"}\) for all other field types, where deliml and delimr refer to the corresponding left and right fields delimiter components of the input arguments deliml and delimr .) |
[in] | deliml | : The input scalar of type field_type, whose components represent the left-delimiters to be used for left-delimiting (wrapping) fields of various intrinsic types. The two most common left-delimiters for strings are the single \(\texttt{'}\) and double \(\texttt{"}\) quotation marks. The common Fortran-style left-delimiter for complex values is the left-parenthesis \(\texttt{(}\).The left-delimiter can be also set directly individually for objects of specific intrinsic types as an input argument to the relevant methods for displaying objects (e.g., show()). Initializing the left-delimiters here, however, defines it globally for all relevant methods throughout the life of the current object of type display_type. Any component of the input deliml will be ignored in constructing the generic field formats, if the input argument format is present and its corresponding component is allocated.(optional, default = delimr or if missing or any component is unallocated, "(" for field of type complex and \(\ms{""}\) (i.e., no left-delimiter) for all other field types.) |
[in] | delimr | : The input scalar of type field_type, whose components represent the right-delimiters to be used for right-delimiting (wrapping) fields of various intrinsic types. The two most common right-delimiters for strings are the single \(\texttt{'}\) and double \(\texttt{"}\) quotation marks. The common Fortran-style right-delimiter for complex values is the right-parenthesis \(\texttt{)}\).The right-delimiter can be also set directly individually for objects of specific intrinsic types as an input argument to the relevant methods for displaying objects (e.g., show()). Initializing the right-delimiters here, however, defines it globally for all relevant methods throughout the life of the current object of type display_type. Any component of the input delimr will be ignored in constructing the generic field formats, if the input argument format is present and its corresponding component is allocated.(optional, default = deliml or if missing or any component is unallocated, ")" for field of type complex and \(\ms{""}\) (i.e., no right-delimiter) for all other field types.) |
[in] | tmsize | : The input scalar integer of default kind IK representing the size of the top margin of any value that will be shown in the display.For more details, see the documentation of the corresponding argument in getCentered. (optional, default = 0 ) |
[in] | bmsize | : The input scalar integer of default kind IK representing the size of the bottom margin of value that will be shown in the display.For more details, see the documentation of the corresponding argument in getCentered. (optional, default = 0 ) |
[in] | count | : The input scalar integer of default kind IK representing the number of times each input value has to be displayed. (optional, default = 1 . It can be present if and only if the optional input argument file is missing.) |
[in] | sticky | : The input scalar of type logical of default kind LK.If .true. , the global properties (i.e., components) of the object of class display_type can be overridden by the corresponding arguments passed to the dynamic methods of the object.(optional, default = .false. ) |
[in] | text | : The input scalar of type wrap_type containing the runtime settings and a method to wrap strings within a fixed width. (optional, default = wrap_type(tmsize = disp%tmsize, bmsize = disp%bmsize, width = disp%width, unit = disp%unit, sticky = disp%sticky) ) |
[in] | mark | : The input scalar of type mark_type containing the runtime settings and a method to display remarks. (optional, default = mark_type(tmsize = disp%tmsize, bmsize = disp%bmsize, width = disp%width, unit = disp%unit, sticky = disp%sticky) ) |
[in] | note | : The input scalar of type note_type containing the runtime settings and a method to display notification messages. (optional, default = note_type(tmsize = disp%tmsize, bmsize = disp%bmsize, width = disp%width, unit = disp%unit, sticky = disp%sticky) ) |
[in] | warn | : The input scalar of type warn_type containing the runtime settings and a method to display warning messages. (optional, default = warn_type(tmsize = disp%tmsize, bmsize = disp%bmsize, width = disp%width, unit = disp%unit, sticky = disp%sticky) ) |
[in] | stop | : The input scalar of type stop_type containing the runtime settings and a method to and stop the program and display program abortion messages. (optional, default = stop_type(tmsize = disp%tmsize, bmsize = disp%bmsize, width = disp%width, unit = disp%unit, sticky = disp%sticky) ) |
Possible calling interfaces ⛓
CHECK_ENABLED=1
.width
is handled as described in the documentation of getCentered.protected
and read-only.public
until the protected
attribute of Fortran 2023 is implemented by the compiler vendors.impure
.
Example usage ⛓
ifort
compiler ⛓ ifort
compiler ⛓ gfortran
compiler ⛓ ifx
version 2024.0.0 ifx
version 2024.0.0 memory sanitizer in debug compilation (with heap memory, serial shared library generation) reports an uninitialized heap memory allocation usage where the constructor opens the specified input file. The cause of this error could not be identified, although the error can be bypassed by compiling in release
mode.
Remedy (as of ParaMonte Library version 2.0.0): Currently none. This may need the attention of the Intel LLVM compiler developer team.
public
attributes of all components of this derived type must be converted to protected
once the protected
attribute of Fortran 2023 is supported by the Fortran compilers supported by the ParaMonte library.
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.
character(3, SK), public pm_io::display_type::advance = SK_"YES" |
integer(IK), public pm_io::display_type::bmsize = 0_IK |
integer(IK), public pm_io::display_type::count = 1_IK |
type(field_type), public pm_io::display_type::deliml |
The scalar object of type field_type containing the left-delimiters for objects of various types.
type(field_type), public pm_io::display_type::delimr |
The scalar object of type field_type containing the right-delimiters for objects of various types.
character(:, SK), allocatable, public pm_io::display_type::file |
type(field_type), public pm_io::display_type::format |
integer(IK), public pm_io::display_type::height = -huge(0_IK) |
type(mark_type), public pm_io::display_type::mark |
type(note_type), public pm_io::display_type::note |
|
private |
type(stop_type), public pm_io::display_type::stop |
type(wrap_type), public pm_io::display_type::text |
integer(IK), public pm_io::display_type::tmsize = 0_IK |
|
private |
The scalar logical
of default kind LK that is internally set to .false.
once the object is constructed.
The presence of this variable is to ensure seamless functioning of objects of display_type when the user forgets to call the type constructor.
The constructor call is critical for setting the allocatable components.
integer(IK), public pm_io::display_type::unit = output_unit |
type(warn_type), public pm_io::display_type::warn |
integer(IK), public pm_io::display_type::width = -huge(0_IK) |