fdoc

functionfind_namepureprivate

pure integer function find_name(c, name) result(id)

The number of name name, or 0.

Arguments

NameTypeIntentAttributesDescription
ctype(fypp_t)in

the state

namecharacter(len=*)in

the name

Result

NameTypeAttributesDescription
idinteger

Source

Show the code
pure integer function find_name(c, name) result(id)
    type(fypp_t), intent(in) :: c               !! the state
    character(len=*), intent(in) :: name        !! the name
    integer :: k

    id = 0
    do k = 1, c%num_names
        if (len(c%names(k)%s) /= len(name)) cycle
        if (c%names(k)%s == name) then
            id = k
            return
        end if
    end do
end function find_name

Graphs

Called by