c
c-----------------------------------------------------------------------
c
c     "Converts" FORTRAN Boolean to {0,1} Boolean.
c
c-----------------------------------------------------------------------
c
      integer function logic(tvalue)
         logical     tvalue
         if( tvalue ) then
            logic = 1
         else
            logic = 0
         end if
         return
      end
