|
◆ vol7d_varvect_index()
integer function vol7d_varvect_index |
( |
type(vol7d_varvect), intent(in) |
this, |
|
|
type(vol7d_var), intent(in) |
search, |
|
|
logical, dimension(:), intent(in), optional |
mask, |
|
|
logical, intent(in), optional |
back, |
|
|
character(len=*), intent(inout), optional |
type |
|
) |
| |
Return the index of first or last element of this equal to search.
- Parametri
-
[in] | this | object to search in |
[in] | search | what to search |
[in] | mask | search only among elements for which mask is .TRUE. |
[in] | back | if .TRUE. search from the end |
[in,out] | type | type of vector found ("d","r","i","b","c") |
Definizione alla linea 183 del file vol7d_varvect_class.f90.
184 TYPE(vol7d_varvect), intent(in) :: this
185 type(vol7d_var), INTENT(in) :: search
186 LOGICAL, INTENT(in), OPTIONAL :: mask(:)
187 LOGICAL, INTENT(in), OPTIONAL :: back
188 character(len=*), intent(inout), optional :: type
194 select case (optio_c( type,1))
197 if ( associated(this%d)) then
198 index_= index(this%d(:), search, mask, back)
202 if ( associated(this%r)) then
203 index_= index(this%r(:), search, mask, back)
207 if ( associated(this%i)) then
208 index_= index(this%i(:), search, mask, back)
212 if ( associated(this%b)) then
213 index_= index(this%b(:), search, mask, back)
217 if ( associated(this%c)) then
218 index_= index(this%c(:), search, mask, back)
223 if ( associated(this%d)) then
224 index_= index(this%d(:), search, mask, back)
225 if ( present(type)) type= "d"
229 if ( associated(this%r)) then
230 index_= index(this%r(:), search, mask, back)
231 if ( present(type)) type= "r"
236 if ( associated(this%i)) then
237 index_= index(this%i(:), search, mask, back)
238 if ( present(type)) type= "i"
243 if ( associated(this%b)) then
244 index_= index(this%b(:), search, mask, back)
245 if ( present(type)) type= "b"
250 if ( associated(this%c)) then
251 index_= index(this%c(:), search, mask, back)
252 if ( present(type)) type= "c"
256 if (index_ == 0) type=cmiss
260 CALL l4f_log(l4f_error, 'variable type not contemplated: '//type)
|