program containd_prog
   implicit none
   integer::i,m
   i=10
   m=half(i)
   print*,i,m
   contains
      function half(j)
         implicit none
         integer::j,half
         half=j/2
         print*,'inside function half',j
         print*, 'testing the outside value here', i
      end function
end program
