functionfind_referenceprivate
integer function find_reference(t, id)
Find link reference id, returning its position or 0.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| t | type(tree_t) | in | the conversion | |
| id | character(len=*) | in | the name |
Result
| Name | Type | Attributes | Description |
|---|---|---|---|
| find_reference | integer |
Calls
Source
Show the code
integer function find_reference(t, id)
type(tree_t), intent(in) :: t !! the conversion
character(len=*), intent(in) :: id !! the name
character(len=:), allocatable :: normal
integer :: k
find_reference = 0
if (size(t%refs) == 0) return
call normal_id(id, normal)
do k = 1, size(t%refs)
if (t%refs(k)%id == normal) find_reference = k
end do
end function find_reference