port_list_find_nbPorts Function

public function port_list_find_nbPorts(me, name) result(idx_out)

Type Bound

port_list_t

Arguments

Type IntentOptional Attributes Name
class(port_list_t), intent(in), target :: me
character(len=*), intent(in) :: name

Name of the component

Return Value integer

Index of the port on ports array


Calls

proc~~port_list_find_nbports~~CallsGraph proc~port_list_find_nbports port_list_t%port_list_find_nbPorts proc~to_int to_int proc~port_list_find_nbports->proc~to_int

Called by

proc~~port_list_find_nbports~~CalledByGraph proc~port_list_find_nbports port_list_t%port_list_find_nbPorts proc~fslink_init_part1 FSlink_init_part1 proc~fslink_init_part1->proc~port_list_find_nbports proc~sssrclink_init_part1 SSsrcLink_init_part1 proc~sssrclink_init_part1->proc~port_list_find_nbports program~reims_p reims_p program~reims_p->proc~fslink_init_part1 program~reims_p->proc~sssrclink_init_part1

Source Code

function port_list_find_nbPorts(me,name) result(idx_out)
    class(port_list_t), target, intent(in) :: me
    character(*), intent(in) :: name !! Name of the component
    integer :: idx_out               !! Index of the port on ports array
    integer :: i, pos

    pos = index(me%list,' '//name//':')
    if (pos == 0) then
        print*, 'ERROR: component "'//name//'" not found in port list.'
        error stop 'Aborting: unknown component ID in connection.'
    endif
    i = pos + len(name) + 2
    idx_out = to_int(me%list(i:))

end function port_list_find_nbPorts