ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
This is a generic method of the derived type display_type with pass
attribute.
More...
This is a generic method of the derived type display_type with pass
attribute.
This method centers the input string str
within the specified width
, adds margins as requested on all sides, then displays the wrapped string in the output display.
str
must have been already wrapped via getStrWrapped with the desired input newline
.str
with the specified left and right margins, then display the wrapped (sandwiched) lines.str
, then they are all lef/right sandwiched in order, then displayed.[in] | str | : The input scalar of type character of kind any supported by the processor (e.g., SK, SKA, SKD , or SKU) that is to be wrapped (sandwiched). |
[in] | newline | : The input scalar of the same type and kind as the input str of arbitrary length type parameter, whose contents represent the dividing point between separate lines in the input str to display.For example, if the string contains the C-style newline character \(\ms{\n}\), then set \(\ms{newline = '\\n'}\). See also the documentation of the corresponding argument in getStrWrapped. (optional, default = new_line(SKG_"a") where SKG refers to the kind of str .) |
[in] | fill | : The input scalar of the same type and kind as the input str of length type parameter len = 1 , containing the value to fill the area between the content and left/right wrap margin in each line of the wrapped str in the display.For more details, see the documentation of the corresponding argument in getCentered. (optional, default = SKG_" " where SKG is the kind of the input argument str .) |
[in] | lwfill | : The input scalar of the same type and kind as the input str of length type parameter len = 1 , containing the value to fill the left wrap margin of each line of the wrapped str in the display.For more details, see the documentation of the corresponding argument in getCentered. (optional, default = MFILL) |
[in] | rwfill | : The input scalar of the same type and kind as the input str of length type parameter len = 1 , containing the value to fill the right wrap margin of each line of the wrapped str in the display.For more details, see the documentation of the corresponding argument in getCentered. (optional, default = MFILL) |
[in] | twfill | : The input scalar of the same type and kind as the input str of length type parameter len = 1 , containing the value to fill the top wrap margin of each line of the wrapped str in the display.(optional, default = MFILL) |
[in] | bwfill | : The input scalar of the same type and kind as the input str of length type parameter len = 1 , containing the value to fill the bottom wrap margin of each line of the wrapped str in the display.(optional, default = MFILL) |
[in] | lwsize | : The input scalar integer of default kind IK representing the size of the left wrap margin of each line of the wrapped str in the display.For more details, see the documentation of the corresponding argument in getCentered. (optional, default = 2_IK ) |
[in] | rwsize | : The input scalar integer of default kind IK representing the size of the right wrap margin of each line of the wrapped str in the display.For more details, see the documentation of the corresponding argument in getCentered. (optional, default = 2_IK ) |
[in] | twsize | : The input scalar integer of default kind IK representing the size of the top wrap margin of the wrapped str in the display.For more details, see the documentation of the corresponding argument in getCentered. (optional, default = 1_IK ) |
[in] | bwsize | : The input scalar integer of default kind IK representing the size of the bottom wrap margin of the wrapped str in the display.For more details, see the documentation of the corresponding argument in getCentered. (optional, default = 1_IK ) |
[in] | tmsize | : The input scalar integer of default kind IK representing the number of rows in the display to skip before printing the wrapped str (i.e., the top margin).(optional, default = 0_IK ) |
[in] | bmsize | : The input scalar integer of default kind IK representing the number of rows in the display to skip after printing the wrapped str (i.e., the bottom margin).(optional, default = 0_IK ) |
[in] | width | : The input scalar integer of default kind IK representing the width of the contents of each wrapped line in the display.For more details, see the documentation of the size argument in getCentered.Note that the full length of each line in the display is lwsize + width + rwsize . (optional, default = 92_IK ) |
[in] | unit | : The input scalar integer of default kind IK representing the output display unit number where the text will be displayed.(optional, default = display_type%unit ) |
[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 wrap_type can be overridden by the corresponding arguments passed to the dynamic methods of the object.(optional, default = .false. ) |
Possible calling interfaces ⛓
width
is handled as described in the documentation of getCentered.impure
.str
is potentially longer than the specified width
, the overflowed text will be symmetrically cut from the beginning and the end of the str
.str
can be first passed to getStrWrapped to wrap it within the desired width
.strWrapped
can be then passed to the procedures under this generic interface for centering, sandwiching, and displaying it.str
with the specified width
by this interface.
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.