- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
This is my first post here. I would like to get some help in developing simple front end to an existing fortran code. Please consider the following -
1. Existing fortran code reads user data through a text input file and runs as a console application. Developed in Compaq fortran without any "GUI".
2. Does whatever calculations (It has its own main, several modules etc)and then writes out text files as output with a bunch of numbers. Leave post processing out for now.
My assumption is that I will be successful (eventually) in getting the code into Intel fortran.
I would like to use MS Visual Studio or whatever features of Intel Visual Fortran to develop a front end to take input from user and produce the "input file". Then run the fortran code with that input file. For starters it could be a simple "user form" of some sort to take input then produce the input file. Then run the fortran code to prodce output files. I am assuming that this wholeprocess will be coded as a single solution (?) within MS VStdio.
I would appreciate any help/pointers. Where do I get started to learn/plan this process?
Thanks
Kedar.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I presume you want to add a GUI to your application. I would suggest that the simplest way to do this is by way of a simple dialog based application..
The dialog would include edit boxes to take user input strings and add them to a file after checking them forand correctingfor keyboard errors.
Add edit controls to take filenames where you want the input to be eventually stored.
Check out the /samples/ folder for your compiler for a dialog application that will give you a working template to start with.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Anthony,
The dialogue based application youhave suggestedsounds like a good start. Can you please clarify the following -
1. I am assuming that the GUI should preferably be an independent program developed. Is this correct? (except for whete it invokes fortran code after writing input file is complete)
2. Given that the basic application is a fortran program - does it have any implications such as having to do this gui development in "visual fortran"? Or basically it doesn't matter inMS visual studio? Any recommendations? Fortran code can still be kept as a "console application" - is this right?
3. If two are done separately, how is the integration to be done? (Fortran code I am referring to has its own development in progress). Some pointers are enough.
My experience so far is in writing the fortran part of this code only. Your help is greatly appreciated. Thank you for responding.
Kedar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Once the user has set up the input data, it is a simple matter to include a 'compute' button in your dialog that calls a subroutine containing your Fortran number-crunching code or which calls a seperate subroutine or function that contains it. This button should be disabled until your computations run to completion, which you can indicate by setting an argument as a return flag. If you make the projecta windows dialog application, you will not get a console. Why would you need a console when you have a GUI which can contain a listbox for you to send your informative output to? (If desperate, I think you can always add one later using the Windows API AllocConsole, when you have gained more experience).
I am assuming of course that you have access to a Fortran compiler integrated with Microsoft Developer Studio (Compaq Visual Fortran, now no longer marketed) or with Microsoft's Visual Studio (such as Intel's IVF), which makes development of windows programs very easy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your good suggestions adn comments. My question about "console" comes from the following -
The fortran program that will run thru GUI has already been written as a console application and has several write(*,*) statements that report things to the console while it runs. I would not want to go into the code and start changing them- unless the change is trivial. Further, if I can keep the front end development independent, I can continue further development of fortran code without too much worry about integrating it into a windows dialogue box application. Two developments can go on in parallel - this of course comes from lack of my experience in developing windows application as such.
Thank you. Your comments have been useful.
Kedar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page