| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=1), | intent(in) | :: | c | |||
| logical, | intent(in) | :: | with_jokers |
if considering jokers |
integer function index_in_cards(c,with_jokers) character(len=1),intent(in) :: c logical,intent(in) :: with_jokers !! if considering jokers integer :: i do i = 1, size(cards_with_joker) if (with_jokers) then if (c == cards_with_joker(i)) then index_in_cards = i return end if else if (c == cards(i)) then index_in_cards = i return end if end if end do error stop 'card not found' end function index_in_cards