I am a newcomer to MinGW and I have a very simple question. I installed MinGW and ran simple FORTRAN programs using the gfortran compiler. I have to write and run programs that read many input data files and/or produce many output files. I am wondering if there is a way, other than specifying the filenames in OPEN statements, to establish a correspondence between the unit numbers and the filenames. In Unix, it is possible to write scripts with SETENV statements associating filenames to unit numbers. The FORTRAN program makes use of the GETENV procedure to obtain the names.. I am wondering if something similar exists for gfortran on a Windows system. If not, what is the best way to provide the filenames to the program without a recompilation each time the filenames are changed ?
I don't fortran but I see no reason why setenv and getenv shouldn't
work for you on Windows since there are C equivalents that do the same
thing.
--
Earnie
-- https://sites.google.com/site/earnieboyd
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
MinGW-users mailing list
MinGW...@lists.sourceforge.net
This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.
_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-use...@lists.sourceforge.net?subject=unsubscribe
I use GFortran every day, on Windows Vista SP2.
GFortran does not support SETENV but it dos support both GETENV and GET_ENVIRONMENT_VARIABLE. GETENV is non-standard. GET_ENVIRONMENT_VARIABLE is standard Fortran starting with Fortran 2003. I strongly recommend that you use the standard intrinsic subroutine GET_ENVIRONMENT_VARIABLE.
Please feel free to contact me at any time with any questions or concerns that you may have.
Sincerely,
Craig T. Dedo
17130 W. Burleigh Place
P. O. Box 423 Mobile Phone: (414) 412-5869
Brookfield, WI 53008-0423 E-mail: <cr...@ctdedo.com>
USA
Linked-In: http://www.linkedin.com/in/craigdedo