forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Update Old F77 Program

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
mike.smartcam



Joined: 02 Aug 2014
Posts: 40
Location: Lancashire, United Kingdom

PostPosted: Fri Sep 05, 2014 1:28 pm    Post subject: Update Old F77 Program Reply with quote

I have some source code (F77) for a technical application written originally to support DOS functions mainly for the user interface and checking file paths etc.

The program as you would expect contains functions; subroutines etc which I would like to port to a Windows 32/64 bit operating system without completely re-writing them.

I am thinking I should write a graphic UI using perhaps Visual Studio Basic or C++ and call the F77 functions and subroutines via dll or .lib support files.

My questions are as follows:

1) Can I create Windows 32/64 bit dll or .lib files using the Watcom system?
2) Should I use dll or .lib files?
3) Could I use Fortran to create a modern GUI and support the existing code
?
4) Is there a better solution?

Thanks for any comments

Mike
_________________
Regards

Mike
Back to top
View user's profile Send private message Send e-mail
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Fri Sep 05, 2014 5:30 pm    Post subject: Reply with quote

I'd forget Watcom: FTN95 is much better and more up to date.

All valid Fortran 77 code compiles straightaway with FTN95, and the bits that don't are often library functions that FTN95 has in some form or other - graphics are a case in point. The first part of a project like yours is to gain familiarity with FTN95 and get to the point where your application compiles and runs as a console application (i.e. as it did under DOS). You won't get DOS graphics, but everything else should be practical. If you try to convert a non-running application you just make life difficult for yourself!

It is highly likely that what you thought was a great user interface under DOS was actually fairly primitive, and is at the least sophisticated end of the scale just a way of specifying input & output file names, with the input data file containing simple lists of numbers. At the most sophisticated end of the scale, it will have data input 'screens' that are rigidly defined. Duplicating the former in Windows is trivial, and duplicating the latter will not satisfy you - it will look primitive!

It is entirely possible to use the Clearwin+ functionality in FTN95 to create a system for inputting information into datafiles, and editing datafiles, but this is usually not a trivial exercise, and you would be well advised to sit and think long and hard about how you want this part of your program to look and operate before you start, especially if you want graphical interaction. Presenting results is much simpler. The analysis 'guts' of your original program will eventually form a few subroutines in this Windows program.

You can do it as a Win32 program or in Visual Studio, but I suggest the former unless you come at this as an experienced programmer in Windows and languages other than Fortran.

For someone with a background in Fortran and nothing else there is no better solution.

Getting some direct instruction in the niceties of Clearwin+ can give you a headstart, as the documentation isn't a self-instruction text. If you are anywhere within easy reach of the area SW of London I could offer volunteer help, but it does depend on where you are based.

Eddie
Back to top
View user's profile Send private message
mike.smartcam



Joined: 02 Aug 2014
Posts: 40
Location: Lancashire, United Kingdom

PostPosted: Mon Sep 08, 2014 8:53 am    Post subject: Reply with quote

Hi Eddie,

Thank you very much for your reply and offer of assistance.

I am based in Lancashire but geography is not really an issue, when I have done some additional research perhaps we could discuss further?

You mention Clearwin+ is this a system which I can download?
Does Clearwin+ interface with FTN95?

Thank you again for your comments.
_________________
Regards

Mike
Back to top
View user's profile Send private message Send e-mail
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Mon Sep 08, 2014 10:10 am    Post subject: Reply with quote

Mike,

Clearwin+ is part of the FTN95 download. You can create the following types of program with FTN95:

1. A console app, which uses the trad text-based I/O interface ignoring Clearwin+
2. A Win32 app (runs fine in Win64, but is limited to 2 or 3 Gb of RAM!) with Clearwin+ used to access almost the full gamut of Windows facilities
3. A Windows app using the Windows .NET system, in which you can use something called 'Visual Clearwin', although this is an avenue I never trod myself.
4. A 64-bit Windows program using the GFortran 64-bit compiler and the 64 bit version of Clearwin (there isn't a 64 bit version of FTN95 as yet).

As Fortran 95 contains the entirety of Fortran 77, converting old software is eased, but of course, the programming style will forever look old fashioned if you follow this route.

A legacy from when FTN95 was FTN77 is a library of huge numbers of routines for various jobs like sorting and converting dates etc.

Somewhere between a half day and a full day in front of a computer together will get you flying with Clearwin+, but from long experience, you have to make sure that the software you are converting runs in a console window ('DOS box') first! To do that you need to master the elements of compiling, linking and running FTN95 programs, and again, there are various routes to this, including doing everything in the command line interface or using the Plato system (also part of the download).

I will send you a private message with contact details.

Eddie
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group