- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In my haste to try new code on an old VS19 project, I edited the FOR code and overwrote my .FOR subroutine. Is there an easy way or tool that could take the working EXE and extract the old code?
I had a working project for a version 1. I must have copied the FOR routine to a new project and called it V2 and compiled that. The EXE works fine but I now want to edit some new code into it.
My problem is I can't find a copy of my FOR subroutine the went into the working EXE for V2.
I then took the V2 project and added a lot of code to make a V3 that now works in VS26 with the IFX. The older versions used iFort if that makes any difference. I'll blame Covid since we worked from home for 1.5 years and I got comfortable walking 50 feet to my home office instead of riding a bus 25 miles.
I have the .FOR code for V1 and I have the .FOR code for V3 and I need to reconstruct the .FOR code for the V2. In this day of AI everything, can I just ask a chatbot to look over the two FOR versions and build the missing piece?
It would likely take me a couple of days comparing the 2 FOR versions to do it manually, but I wanted to see if there could be an easier way.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Reverse engineering compiled code into Fortran is next to impossible, and even if you could do it, it would not look anything like your original code.
This is why backups and versioning of code are so important - I learned the hard way many years ago, when I lost about one months' consulting work due to a disc failure. The only consolation was that having repeated the work (gratis of course), I believe that my second attempt at the coding was probably better than the first.
All the best with your manual attempt!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi David,
Thanks for the reply. I do have a couple of old thumb drives to check at home and at work before I dive in to manually recreate the V2 state of the program. My home PC may have some old files also. The missing/overwritten code has about 600 lines and I think I can figure out the lines added between V2 and V3.
I only occasionally write and compile Fortran code and dealing with the VS26 environment is daunting. I should have just started a new project and brought in the 5 source files and edited the main routine that I wanted to update, but I'm an engineer and only do Fortran for myself and a few engineers around me.
I do need to learn the debugging stuff in VS26. I typically put in write statements to print out variables and do a trial run to see if the program is calculating things correctly. All the breakpoint stuff is foreign to me. I guess I need to look at some YouTube videos about debugging code.
I'm about to retire and will have some time to play with it.
BTW, I had a typo in my original post and was trying to figure out how to edit my post but never could see where.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page