disp_set(3f) - [M_display] set default options for disp(3f)
Description
The Derived Type Disp_settings
Calling Syntax For Disp_set
Author
The subroutine DISP_SET may be used to change default values of all the arguments of DISP except TITLE, X, FMT and LBOUND. In addition the default separator between items that are displayed side-by-side (using ADVANCE=no) may be changed with the MATSEP argument.
M_display contains the following definition of the data type DISP_SETTINGS.
character(3) :: advance = YES character(9) :: matsep = character(3) :: orient = COL character(9) :: sep = character(19) :: style = LEFT character(4) :: trim = AUTO character(9) :: zeroas = integer :: digmax = 6 integer :: matseplen = 3 integer :: seplen = 2 integer :: unit = -3 integer :: zaslen = 0
Structures of type DISP_SETTINGS may be used to save and later restore format control settings of DISP. As shown, new variables of this type will automatically have default values for all components.
There are two ways to call DISP_SET:
CALL DISP_SET(SETTINGS) CALL DISP_SET(ADVANCE, DIGMAX, MATSEP, ORIENT, SEP, STYLE, UNIT, ZEROAS)Both calls change the default format control used in subsequent calls to DISP. In the first call, SETTINGS is of type DISP_SETTINGS and the default values for all arguments is changed. In the second call all the arguments are optional. If an argument is absent the corresponding default setting is not changed. An example call is
CALL DISP_SET(STYLE = PAD, SEP = ).The effect is that titles will be written padded above matrices, and matrix column will be separated by one blank. The type and purpose of all the arguments except MATSEP has been described in section 3.2.
MATSEP = ms Specifies a character string of length <= 9 that is written out between items (matrices) when they are displayed side-by-side. An example is: CALL DISP(X, ADVANCE=NO) CALL DISP(Y, ADVANCE=NO) CALL DISP_SET(MATSEP= | ) CALL DISP(Z, ADVANCE=YES)The output from these calls might be:
12.2 | 1.3 | 1 9.6 | 13.0 | 3 -2.0 | 4.0 | 4Note that MATSEP affects the separation of all items that have been placed in the output queue of the unit being displayed on.
Based on dispmodule(3f), "A Fortran 95 module for pretty-printing matrices". Version number 1.02 6-Sept-2008, Kristjan Jonasson, Dept. of Computer Science, University of Iceland (jonasson@hi.is).
Nemo Release 3.1 | disp_set (3) | February 23, 2025 |