<Example Program>

Program intent_example
    Integer card(5),counter
    counter = 10
    Call sub1( counter, Size(card), card )
    Print *,counter,card(3)
End
Subroutine sub1( counter, ncards, card )
   
Integer, Intent(InOut) :: counter
    Integer, Intent(In) :: ncards
    Integer, Intent(Out) :: card(ncards)

    Do i = 1, ncards
        card(i) = i*100
        counter = counter + 1
    End Do
End

Execution Results

  15 300