program ex0703
implicit none
imteger :: a=10, b=20
interface
subroutine sub(a, b)
implicit none
integer, intent(in) :: a
integer, intent(in), optional :: b
end subroutine sub
end interface
write(*,*) 'Call sub with arg a’
call sub(a)
write(*,*) 'Call sub with arg a, b’
call sub(a, b)
stop
end program ex0703