-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
work on using more portable type constraints
- Loading branch information
1 parent
03e18e4
commit 56a6af7
Showing
6 changed files
with
69 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
constants.f90 | ||
============= | ||
|
||
View source code :source:`fortran/include/constants.f90` | ||
|
||
.. f:module:: constants | ||
.. f:variable:: i1t | ||
:type: integer | ||
.. f:variable:: i4t | ||
:type: integer | ||
.. f:variable:: i19t | ||
:type: integer | ||
|
||
A set of digit type constraints that denote how many decimal digits a number can support. | ||
They are given as ``i<len>t`` or ``r<len>_<exp>t`` | ||
|
||
.. f:variable:: errort | ||
:type: integer(i1t) | ||
.. f:variable:: int64t | ||
:type: integer(i1t) | ||
.. f:variable:: stringt | ||
:type: integer(i1t) | ||
|
||
Denotes the type of an :f:type:`AnswerT` | ||
|
||
.. literalinclude:: ../../../../fortran/src/include/constants.f90 | ||
:language: Fortran | ||
:linenos: | ||
|
||
.. tags:: constants |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module constants | ||
implicit none | ||
|
||
integer, parameter :: i1t = selected_int_kind(1) | ||
integer, parameter :: i4t = selected_int_kind(4) | ||
integer, parameter :: i19t = selected_int_kind(19) | ||
|
||
integer(i1t), parameter :: errort = 0 | ||
integer(i1t), parameter :: int64t = 1 | ||
integer(i1t), parameter :: stringt = 2 | ||
|
||
contains | ||
end module constants | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters