      subroutine swap(ix, iy)
      it = ix
      ix = iy
      iy = it
      return
      end

      function ichoose(ip, iq)
      if ( 5 > 1 ) then
         ichoose = ip
      else
         ichoose = iq
      endif
      return
      end

      ia = 4
      ib = 5
      ic = 6

      print *, 'before ', ia, ib, ic

c     call swap(ia, ib)
      call swap(ia, ichoose(ib, ic))

      print *, 'after ', ia, ib, ic

      stop
      end
