functionmodule_positionpureprivate
pure integer function module_position(p, id)
The position in p%modules of module entity id, or 0.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| p | type(project_t) | in | the project | |
| id | integer | in | the module |
Result
| Name | Type | Attributes | Description |
|---|---|---|---|
| module_position | integer |
Source
Show the code
pure integer function module_position(p, id)
type(project_t), intent(in) :: p !! the project
integer, intent(in) :: id !! the module
integer :: k
module_position = 0
do k = 1, size(p%modules)
if (p%modules(k) == id) then
module_position = k
return
end if
end do
end function module_position