Fortran Windows Application
Fortran Windows Application
(OP)
I have a console program to do some data processing, but I want to create a Windows GUI version of it. However, I cannot find any resources online. Currently I am using Compaq Visual Fortran.
The program reads in 4 files and writes 2 output files.
I am wondering how I can port the current code directly into a fortran windows application with minimal modifications.
I know that I have to use dfwin library to do this, but i am not sure how to get started
The program reads in 4 files and writes 2 output files.
I am wondering how I can port the current code directly into a fortran windows application with minimal modifications.
I know that I have to use dfwin library to do this, but i am not sure how to get started
RE: Fortran Windows Application
The purpose of the interface being to create the input files needed to run your Fortran program. The Fortran program can be compiled as a *.dll to be called from your VB interface. Output files can be displayed directly in the VB interface.
How?
In Compaq Visusl Fortran, specify the project type as a Fortran dynamic link library project.
In your fortran code replace the
PROGRAM myProgram
with
SUBROUTINE myProgram(nParam)
!MS$ATTRIBUTES DLLEXPORT :: myProgram
Note:- if required(nParam) can be a number of parameters passed from the VB interface
and replace the final
STOP
with
RETURN
Presumably your existing program reads input files as part of its execution so no changes are needed there. Use you VB application to create the input files to be read by your new myProgram.dll. The output files created by the new dll can be displayed directly in the VB environment if required
Refer to your VB documents for calling and using dll's
RE: Fortran Windows Application
RE: Fortran Windows Application
It is a Java Interface that works in quite a few languages. It is ok as long as you are not polling: just sit at j_nextaction and wait for the next thing to be clicked. Download the examples in both Fortran 77 and 90 and have a play. It is a very quick way of getting a GUI up as long as you are not after anything sophisticated.
RE: Fortran Windows Application
The way I see it is that it is the same amount of work but you end up with one code and not a couple (DLL+GUI)