Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Tue, 28 Aug 2001 09:03:42 -0400
From: Paul Dilip K NPRI <PaulDK@Npt.NUWC.Navy.Mil>
Subject: Calling cygwin from MSVS6.0 Fortran program
To: "'cygwin@cygwin.com'" <cygwin@cygwin.com>
Message-id: 
 <CEB144BF16CCD2118F4800805FE6A25302BD5CF1@NPRI54EXC07.NPT.NUWC.NAVY.MIL>
MIME-version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-type: multipart/mixed; boundary=------------InterScan_NT_MIME_Boundary

--------------InterScan_NT_MIME_Boundary
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C12FC1.DCE6A060"

------_=_NextPart_001_01C12FC1.DCE6A060
Content-Type: text/plain;
	charset="windows-1252"

I am writing a dialog box based fortran program where I have several buttons and edit boxes for options to edit files, deleting files, plotting data using Matllab etc. Now I like to add another button for option to generate an input file. The file to make an input file is Unix script file which I ran successfully in CYGWIN environment using the tshell. I know to call Matlab I had to call their 'engOpen' routine. Is there anything similar in CYGWIN? A short routine is added below-
 
  retlog = DlgGet(dlg,IDC_COMBO1,edtdat)                     
     
     IF(edtdat .eq. 'Y') THEN
       call fopen
        
  END IF
    retlog = DlgGet( dlg, IDC_CHECK1, check )
 if(check) then
 call fileopen
 end if
   
      call  mainsub   !start hfeam calculations         !JD commented
   !call thfm
      !WRITE (text,*,iostat=retint) amtIF ( retint .eq. 0 ) THEN
   
!     IF ( retint .eq. 0 ) THEN
        retlog = DlgGet(dlg,IDC_COMBO2,pltdat)
     IF(pltdat .eq. 'Y') THEN
  ep = engOpen('matlab ')
        if (ep .eq. 0) then
         write(6,*) 'Can''t start MATLAB engine'
         stop
        endif
   call engEvalString(ep, 'cd c:\dhfeam\hfeam')
         call engEvalString(ep, 'plothfeam');
 
I want to add something on top so that depending on the choice it will invoke the cygwin ( go to the directory-cygwin\home\pauldk) and execute the script file 'select' and generate the input file 'input.dat' and move it to (cd c:\dhfeam\hfeam or mv) and then the file can be edited using - IF(edtdat .eq. 'Y') THEN call fopen.
 
Thanks

Dilip K. Paul

Naval Undersea Warfare Center

Code 8121, Bldg. 679/2

Newport, RI 02841

Tel: (401) 832-1412

 <mailto:pauldk@npt.nuwc.navy.mil> mailto:pauldk@npt.nuwc.navy.mil

 

------_=_NextPart_001_01C12FC1.DCE6A060
Content-Type: text/html;
	charset="windows-1252"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">


<META content="MSHTML 5.00.2919.6307" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=990394412-28082001>I am writing a 
dialog box based fortran program where I have several buttons and edit boxes for 
options to edit files, deleting files, plotting data using Matllab etc. Now I 
like to add another button for option to generate an input file. The file to 
make an input file is Unix script file which I ran successfully in CYGWIN 
environment using the tshell. I know to call Matlab I had to call their 
'engOpen' routine. Is there anything similar in CYGWIN? A short routine is added 
below-</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=990394412-28082001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=990394412-28082001>&nbsp; retlog = 
DlgGet(dlg,IDC_COMBO1,edtdat)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp; IF(edtdat .eq. 'Y') 
THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call 
fopen<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;END 
IF<BR>&nbsp;&nbsp;&nbsp; retlog = DlgGet( dlg, IDC_CHECK1, check 
)<BR>&nbsp;if(check) then<BR>&nbsp;call fileopen<BR>&nbsp;end if<BR>&nbsp;&nbsp; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call&nbsp; mainsub&nbsp;&nbsp; !start hfeam 
calculations&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; !JD 
commented<BR>&nbsp;&nbsp; !call thfm<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; !WRITE 
(text,*,iostat=retint) amtIF ( retint .eq. 0 ) THEN<BR>&nbsp;&nbsp; 
<BR>!&nbsp;&nbsp;&nbsp;&nbsp; IF ( retint .eq. 0 ) 
THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; retlog = 
DlgGet(dlg,IDC_COMBO2,pltdat)<BR>&nbsp;&nbsp;&nbsp;&nbsp; IF(pltdat .eq. 'Y') 
THEN<BR>&nbsp;&nbsp;ep = engOpen('matlab 
')<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (ep .eq. 0) 
then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; write(6,*) 'Can''t 
start MATLAB engine'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
stop<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; endif<BR>&nbsp;&nbsp; call 
engEvalString(ep, 'cd 
c:\dhfeam\hfeam')<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call 
engEvalString(ep, 'plothfeam');</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=990394412-28082001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=990394412-28082001>I want to add 
something on top so that depending on the choice it will invoke the cygwin ( go 
to the directory-cygwin\home\pauldk) and execute the script file 'select' and 
generate the input file 'input.dat' and move it to (cd c:\dhfeam\hfeam or mv) 
and then the file can be edited using - IF(edtdat .eq. 'Y') THEN call 
fopen.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=990394412-28082001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=990394412-28082001>Thanks</SPAN></FONT></DIV>
<P align=left><FONT color=#808000 face="Monotype Corsiva" size=4>Dilip K. 
Paul</FONT></P>
<P align=left><FONT color=#800000 face="Lucida Console" size=2><FONT 
color=#800000 face="Lucida Console" size=2>Naval Undersea Warfare 
Center</FONT></FONT></P>
<P align=left><FONT color=#800000 face="Lucida Console" size=2>Code 8121, Bldg. 
679/2</FONT></P>
<P align=left><FONT color=#800000 face=Arial size=2>Newport, RI 02841</FONT></P>
<P align=left><FONT color=#800000 face=Arial size=2>Tel: (401) 
832-1412</FONT></P>
<P align=left><A href="mailto:pauldk@npt.nuwc.navy.mil"><U><FONT 
color=#0000ff>mailto:pauldk@npt.nuwc.navy.mil</FONT></U></A></P>
<DIV>&nbsp;</DIV></BODY></HTML>

------_=_NextPart_001_01C12FC1.DCE6A060--


--------------InterScan_NT_MIME_Boundary
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
--------------InterScan_NT_MIME_Boundary--

