- Timestamp:
- Sep 3, 2017, 12:28:45 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/module_generic.f90
r1612 r1615 6 6 ! ErrWarnMsg: Function to print error/warning message 7 7 ! index_list_coordsI: Function to provide the index of a given coordinate within a list of integer coordinates 8 ! Index1DArrayI: Function to provide the first index of a given value inside a 1D integer array 8 9 ! Index1DArrayR: Function to provide the first index of a given value inside a 1D real array 9 10 ! Index1DArrayR_K: Function to provide the first index of a given value inside a 1D real(r_k) array … … 104 105 105 106 END FUNCTION Nstrings 107 108 INTEGER FUNCTION Index1DArrayI(array1D, d1, val) 109 ! Function to provide the first index of a given value inside a 1D integer array 110 111 IMPLICIT NONE 112 113 INTEGER, INTENT(in) :: d1 114 INTEGER, INTENT(in) :: val 115 INTEGER, DIMENSION(d1), INTENT(in) :: array1D 116 117 ! Local 118 INTEGER :: i 119 120 fname = 'Index1DArrayI' 121 122 Index1DArrayI = -1 123 124 DO i=1,d1 125 IF (array1d(i) == val) THEN 126 Index1DArrayI = i 127 EXIT 128 END IF 129 END DO 130 131 END FUNCTION Index1DArrayI 106 132 107 133 INTEGER FUNCTION Index1DArrayR(array1D, d1, val)
Note: See TracChangeset
for help on using the changeset viewer.