replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Legacy program exes conversion to dlls
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 

Legacy program exes conversion to dlls

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



Joined: 22 Dec 2010
Posts: 28

PostPosted: Thu Dec 23, 2010 7:01 am    Post subject: Legacy program exes conversion to dlls Reply with quote

Hi

I have some FORTRAN exes which I now want to convert to dlls callable from my VB .NET Code.

At present these exes take input from files on disk and their names are hard coded inside the FORTRAN code. Each program makes some output files which are then used by the subsequent FORTRAN program.

I need to convert these to dll so that each program can in fact become a subroutine. Instead of taking input from files on disk, I intend to pass the file contents as string argument and instead of saving output to disk, I intend to recieve the file contents as string output.

All the programs currently use the FORMATTED READ and WRITE statements heavily and I am thinking of using internal READ/WRITE on character variables instead of files.

The problem I foresee is in the fact that the READ internal statement remains at the beginning of the string and so the subsequent READ statements all fail.

Any advise on above ?

Thanks
Abhishek
Back to top
View user's profile Send private message
LitusSaxonicum



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

PostPosted: Thu Dec 23, 2010 3:28 pm    Post subject: Reply with quote

My advice is not to make too many changes at any one time. If all of the subroutines across all of the legacy programs have unique names, then you can simply make all of the PROGRAM routines into subroutines, and call each program in turn.

Indeed, you can keep all of your legacy programs as standalone programs, and start them one after the other with CALL START_PROCESS@ - then it doesn't matter if each program has some routines with non-unique names.

You can also keep writing to and reading from those hard-coded named files. If the writing is immediately followed by reading, the file contents are probably still held in cache, and you will get memory access speeds!

Then, when you are ready, you can tackle each category of change.

It is highly likely if you invoke all of your legacy programs one after the other in the same order each time that they are all very small, and when you roll them into one larger program it will still be small relative to the size of memory in a modern PC. It was when I did something similar!

Eddie
Back to top
View user's profile Send private message
Abhishek



Joined: 22 Dec 2010
Posts: 28

PostPosted: Thu Dec 23, 2010 5:03 pm    Post subject: Reply with quote

Not to make too many changes at one time is precisely the reason I intend to use the internal READ and WRITE statements.

Right now i am calling each one of the programs as separate processes in my VB .NET code and it is leading to a big performance drag due to disk I/O.

Do you think there is a solution to this internal READ/WRITE issue ?

Thanks
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