[UP]


Manual Reference Pages  - disp_get (3)

NAME

disp_get(3f) - [M_display] return default settings in a structure of DISP(3f) settings

CONTENTS

Description
Example
Author

DESCRIPTION

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.

EXAMPLE

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)
   contains

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

Expected:

   x=1.000,6.000,5.000
     2.400,4.000,6.000

y=0.000,3.500,2.000 7.000,4.000,8.220

AUTHOR

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).


disp_get (3) January 24, 2020
Generated by manServer 1.08 from 6012621e-7191-4fc4-9b04-a911d30e4ea6 using man macros.