#include <fintrf.h>
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
      pointer ep, engOpen
      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
