|
8 | 8 | !
|
9 | 9 | !# See also
|
10 | 10 | ! * Inspired by: [EasyPlot](https://pypi.python.org/pypi/EasyPlot)
|
| 11 | +! |
| 12 | +!@note The default real kind (`wp`) can be |
| 13 | +! changed using optional preprocessor flags. |
| 14 | +! This library was built with real kind: |
| 15 | +#ifdef REAL32 |
| 16 | +! `real(kind=real32)` [4 bytes] |
| 17 | +#elif REAL64 |
| 18 | +! `real(kind=real64)` [8 bytes] |
| 19 | +#elif REAL128 |
| 20 | +! `real(kind=real128)` [16 bytes] |
| 21 | +#else |
| 22 | +! `real(kind=real64)` [8 bytes] |
| 23 | +#endif |
11 | 24 |
|
12 | 25 | module pyplot_module
|
13 | 26 |
|
14 |
| - use, intrinsic :: iso_fortran_env, only : real64, error_unit |
| 27 | + use, intrinsic :: iso_fortran_env |
15 | 28 |
|
16 | 29 | implicit none
|
17 | 30 |
|
18 | 31 | private
|
19 | 32 |
|
20 |
| - integer, parameter, private :: wp = real64 !! Default real kind [8 bytes]. |
| 33 | +#ifdef REAL32 |
| 34 | + integer,parameter,public :: pyplot_wp = real32 !! real kind used by this module [4 bytes] |
| 35 | +#elif REAL64 |
| 36 | + integer,parameter,public :: pyplot_wp = real64 !! real kind used by this module [8 bytes] |
| 37 | +#elif REAL128 |
| 38 | + integer,parameter,public :: pyplot_wp = real128 !! real kind used by this module [16 bytes] |
| 39 | +#else |
| 40 | + integer,parameter,public :: pyplot_wp = real64 !! real kind used by this module [8 bytes] |
| 41 | +#endif |
| 42 | + |
| 43 | + integer,parameter :: wp = pyplot_wp !! local copy of `pyplot_wp` with a shorter name |
21 | 44 |
|
22 | 45 | character(len=*), parameter :: tmp_file = 'pyplot_module_temp_1234567890.py' !! Default name of the temporary file
|
23 | 46 | !! (this can also be user-specified).
|
|
0 commit comments