Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a user interface for Fortran program 1

Status
Not open for further replies.

Qshake

Structural
Jul 12, 2000
2,672
All,

Am working on programs in Fortran and for years these programs have read data files and produced separate output files. But nowadays it seems that I should be upgrading to use some sort of pre or post processing unit to assit others with input and output.

I would greatly appreciate it if someone could direct me to a program that would help with this situation. A link and even an example would be greatly appreciated.

Thanks

Regards,
Qshake
[pipe]
Eng-Tips Forums:Real Solutions for Real Problems Really Quick.
 
Replies continue below

Recommended for you

Many legacy programs get a Windows GUI, but still call the DOS-based Fortran program and either intercept the output or read the file output.

TTFN
 
Most if not all PC based fortran compilers allow the programmer to build in a windows GUI. I use Salford FTN95 which has excellent facilities to do this. Otherwise a very popular facility which works with most compilers is Winteracter ( )
 
This is ABSOFT - Pro Fortran

Admittedly, I know nothing about programs outside Fortran...I'm taking several old programs that were written some time ago and trying to make them more user friendly for the younger engineers.....hell one of them could probably write an interface using what they've learned with programming in the University!

Again, I appreciate all the help you've offered.

Regards,
Qshake
[pipe]
Eng-Tips Forums:Real Solutions for Real Problems Really Quick.
 
You don't even have to use Fortran, per se. I've used Visual Basic for Applications to edit the input file, run a legacy Fortran program from Excel, get the results and process/plot the results.

TTFN
 
IRSTUFF,

What would be most helpful is if you could point me to a website that explains how to use (get familar with) this Visual Basic for Applications and how to tailor it to use and produce results from Fotran.

Thanks.

Regards,
Qshake
[pipe]
Eng-Tips Forums:Real Solutions for Real Problems Really Quick.
 
VBA comes with Microsoft Office for Word and Excel.

There are a variety of sites on the web with general information about VBA.

The rest is OJT, on the job training. The Macro Recorder will record your real-time commands, so you can get a feel for what the syntax looks like.

TTFN
 
Another alternative if you can change your compiler to G77 or G95, and use JAPI ( There is a F77 interface for both Windows and Linux. You will have to write the F90 header by yourself but it is not difficult.

Download the example programs and have a play.
 
IRstuff's suggestion that you don't have to write more fortran code is a good one. However it may require a subtle change to your fortran, can you run the fortran program in a DOS window by issuing a command like:-

program.exe data.dat results.out

If so then it is very easy to launch it from other applications.
 
What's wrong the younger engineer can't use a text editor to create his input file?? Engineers should be doing engineering..not software development(btw I'm a fairly young engineer at 30 so you can't say that I'm just an old fart talking..)
 
pja

Any respectable engineer would be quite happy to create text input files and run a DOS or Unix based simple application which takes text files in and writes text output files.

It's the pervading climate (call it hype or spin) that demands that every application should be windows based, to enable results to be fed directly into word, excel, powerpoint .... ultimately to produce a nice pretty colourful graph, pie chart...or whatever to keep the management happy. Unfortunately a flashy XML display or 3D carpet plot is what's expected, not columns of numbers in a text file. Thus it follows that text based applications are percieved as out of date/behind the times irrespective of how good they actually are.
 
pja,

actually, being an old fart; I can say that sometimes, you had to dig in yourself to get want you really need.

We used to have a command-line program that worked as described above. I could, with some work, connive to run a batch mode using VBA and Excel and port the results into Excel, thus allowing you to run trades with different parameters.

The "new and improved" Windows GUI version all but made that impossible. And that's the crux of the dilemma; programmers have their own ideas about a "great" interface that's TOTALLY unrelated to what engineers need or want.

TTFN



 
IRstuff

Well said ! That's exactly what am witnessing today. I work for a company that myself and others have developed very powerful and useful fortran code that performs excellently, produces the results we require in a format that's easily interpreted, and of course is easy to run in batch mode. Now management insist that we go cots (commercial of the shelf), needlessly to say the commercial stuff is inferior in every respect, badly written, requires mega machines with gigabytes of ram etcetera... oh but it does have a windows front end!
 
That's why I suggested JAPI - it is a Java front end for Fortran and C on a variety of platforms so you can have a flashy GUI and still use the code which you know works. The interface is really simple and it doesn't require gigabytes.
 
I have used Excel as a pre and post processor for some old Fortran code I wrote several years ago. A friend wrote the Excel Macro that created the input data file for the Fortran pgm then read in the output from the Fortran output file and did some post processing.

_____________________________________
I have been called "A storehouse of worthless information" many times.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor