1
- Proposal for Fortran Standard: 202y (NOT 202x)
2
-
3
1
To: J3 J3/19-246
4
- From: Ondřej Čertík
2
+ From: Ondrej Certik
5
3
Subject: Namespace For Modules
6
- Date: 2019-October-15
4
+ Date: 2019-October-16
5
+
6
+ Proposal for Fortran Standard: 202y (NOT 202x)
7
+
7
8
8
9
1. Introduction
9
10
10
- The proposal is to allow import a module as a namespace and access its members
11
- using the % operator. Example:
11
+ The proposal is to allow import a module as a namespace and access its
12
+ members using the % operator. Example:
12
13
13
14
use, namespace :: utils
14
15
...
@@ -78,11 +79,12 @@ With this proposal one could also do:
78
79
79
80
3.2 Need to import lots of functions from a module
80
81
81
- Exisintg code (https://github.com/certik/fortran-utils/blob/b43bd24cd421509a5bc6d3b9c3eeae8ce856ed88/src/linalg.f90):
82
+ Exising code (https://github.com/certik/fortran-utils/blob/
83
+ b43bd24cd421509a5bc6d3b9c3eeae8ce856ed88/src/linalg.f90):
82
84
83
85
use lapack, only: dsyevd, dsygvd, ilaenv, zgetri, zgetrf, zheevd, &
84
- dgeev, zgeev, zhegvd, dgesv, zgesv, dgetrf, dgetri, dgelsy, zgelsy, &
85
- dgesvd, zgesvd, dgeqrf, dorgqr, dpotrf, dtrtrs
86
+ dgeev, zgeev, zhegvd, dgesv, zgesv, dgetrf, dgetri, dgelsy, &
87
+ zgelsy, dgesvd, zgesvd, dgeqrf, dorgqr, dpotrf, dtrtrs
86
88
...
87
89
call dgeev('N', 'V', n, At, lda, wr, wi, vl, ldvl, vr, ldvr, &
88
90
work, lwork, info)
@@ -100,5 +102,7 @@ Instead, one can write it as:
100
102
call lapack%dgetrf(n, n, Amt, lda, ipiv, info)
101
103
...
102
104
103
- Then when another subroutine must be called from the `lapack` module, one can
104
- just call it, without having to modify the `use` statement.
105
+ Then when another subroutine must be called from the `lapack` module, one
106
+ can just call it, without having to modify the `use` statement.
107
+
108
+
0 commit comments