c
c	ENGTEST2
c
c	Simple program that illustrates how to call the Engine Library
c	from a Fortran program.  
c
c	The example starts a MATLAB engine on a machine that you are
c	currently logged into.
c
      program main
c-----------------------------------------------------------------------
c (pointer) Replace integer*4 by integer*8 on alpha and cray
c
      integer*4 ep, engOpen
c-----------------------------------------------------------------------
      integer engClose, stat
c
      ep = engOpen('matlab ')
c
      if (ep .eq. 0) then
          write(6,*) 'Can''t start MATLAB engine'
          stop
      endif
c
      stat = engClose(ep)
c
      stop
      end
