disp_get(3f) - [M_display] return default settings in a structure of DISP(3f) settings
Description
Example
Author
The argumentless function DISP_GET returns the current default settings in a structure of type DISP_SETTINGS. If a subroutine changes the default settings with DISP_SET it is possible to save the settings that are in effect when the routine is entered, and restore these settings before returning from the routine.
An example is:
program demo_disp_get real :: xx(2,3), yy(2,3) xx(1,:)=[ 1.0, 6.0, 5.0 ] xx(2,:)=[ 2.4, 4.0, 6.0 ] yy(1,:)=[ 0.0, 3.5, 2.0 ] yy(2,:)=[ 7.0, 4.0, 8.22 ] call disp_xy(xx,yy) containsExpected:subroutine disp_xy(x,y) use M_display real x(:,:), y(:,:) type(disp_settings) ds ds = disp_get() call disp_set(digmax=4, sep=,) call disp(x=,x) write(*,*) call disp(y=,y) call disp_set(ds) end subroutine disp_xy
end program demo_disp_get
x=1.000,6.000,5.000 2.400,4.000,6.000y=0.000,3.500,2.000 7.000,4.000,8.220
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_get (3) | February 23, 2025 |