This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Calling cygwin from MSVS6.0 Fortran program
- To: "'cygwin at cygwin dot com'" <cygwin at cygwin dot com>
- Subject: Calling cygwin from MSVS6.0 Fortran program
- From: Paul Dilip K NPRI <PaulDK at Npt dot NUWC dot Navy dot Mil>
- Date: Tue, 28 Aug 2001 09:03:42 -0400
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
--
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/