On Fri, 11 Apr 2025 11:37:17 +0200, Bonita Montero wrote:
Am 09.04.2025 um 21:48 schrieb Lynn McGuire:
No, we want to get away from compiling and linking directly.
That is what we use with Open Watcom F77 and C++.
The Watcom stuff is totally outdated.
Is there no way to get something newer ?
You must be new here in c.l.f. Lynn has been converting
his 700 KLOC of Fortran to C++ for 2+ decades. It seems
his code, which clearly isn't Fortran, can only be compiled
by a Watcom language compiler. For those playing along,
that's roughy converting 140 lines of code per workday
with 2 weeks for good behavior (ie., 700000 / (50*5*20)).
On 4/11/2025 11:00 AM, Steven G. Kargl wrote:
On Fri, 11 Apr 2025 11:37:17 +0200, Bonita Montero wrote:
Am 09.04.2025 um 21:48 schrieb Lynn McGuire:
In <118sel3$dop4$1@dont-email.me> Lynn McGuire <lynnmcguire5@gmail.com> wrote:
On 4/11/2025 11:00 AM, Steven G. Kargl wrote:
On Fri, 11 Apr 2025 11:37:17 +0200, Bonita Montero wrote:
Am 09.04.2025 um 21:48 schrieb Lynn McGuire:
Why is a year-old thread popping up with nothing new added?
On 2026-09-22, Harold Stevens <wookie@bookworm.localdomain> wrote:
In <118sel3$dop4$1@dont-email.me> Lynn McGuire <lynnmcguire5@gmail.com> wrote:
On 4/11/2025 11:00 AM, Steven G. Kargl wrote:
On Fri, 11 Apr 2025 11:37:17 +0200, Bonita Montero wrote:
Am 09.04.2025 um 21:48 schrieb Lynn McGuire:
Why is a year-old thread popping up with nothing new added?
Ooops. Sorry Lynn. I noticed you're updating your progress. Mea culpa ...
On 4/11/2025 11:00 AM, Steven G. Kargl wrote:
On Fri, 11 Apr 2025 11:37:17 +0200, Bonita Montero wrote:
Am 09.04.2025 um 21:48 schrieb Lynn McGuire:
No, we want to get away from compiling and linking directly.
That is what we use with Open Watcom F77 and C++.
The Watcom stuff is totally outdated.
Is there no way to get something newer ?
You must be new here in c.l.f. Lynn has been converting
his 700 KLOC of Fortran to C++ for 2+ decades. It seems
his code, which clearly isn't Fortran, can only be compiled
by a Watcom language compiler. For those playing along,
that's roughy converting 140 lines of code per workday
with 2 weeks for good behavior (ie., 700000 / (50*5*20)).
I am now well over conversion of 200,000 lines of my 800,000+ Fortran
66/77 code to C++. Things are going well other than customer demands
for new features constantly interrupting things. And fixing old bugs of course. I am now shooting for completion by Summer 2027.
The C++ conversion of the F66 / F77 code has unearthed innumerable old
bugs. It is a wonder that the code has ever worked.
My conversion tool, a customized version of F2C, converts all Fortran character variables to straight C char variables. I would really like
to automatically convert these to C++ std::string variables as I am
doing that by hand. This is the main thing slowing me down.
Since I have a builtin Fortran 66 compiler and interpreter in my
software, I may be writing an automated Fortran format and write
statement processor anyway in the near future. So I am thinking about updating my conversion tool.
Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
On 4/11/2025 11:00 AM, Steven G. Kargl wrote:
On Fri, 11 Apr 2025 11:37:17 +0200, Bonita Montero wrote:
Am 09.04.2025 um 21:48 schrieb Lynn McGuire:
No, we want to get away from compiling and linking directly.
That is what we use with Open Watcom F77 and C++.
The Watcom stuff is totally outdated.
Is there no way to get something newer ?
You must be new here in c.l.f. Lynn has been converting
his 700 KLOC of Fortran to C++ for 2+ decades. It seems
his code, which clearly isn't Fortran, can only be compiled
by a Watcom language compiler. For those playing along,
that's roughy converting 140 lines of code per workday
with 2 weeks for good behavior (ie., 700000 / (50*5*20)).
I am now well over conversion of 200,000 lines of my 800,000+ Fortran
66/77 code to C++. Things are going well other than customer demands
for new features constantly interrupting things. And fixing old bugs of
course. I am now shooting for completion by Summer 2027.
The C++ conversion of the F66 / F77 code has unearthed innumerable old
bugs. It is a wonder that the code has ever worked.
I am not very surprised at that.
Out of curiosity: What types of errors did you find? Was it logic
errors (although those would have been hard to find by conversion
to a different language, unless this caused you to look at old code), argument mismatch errors, errors in memory handling through COMMON
blocks, ... ?
(I still find it a pity that you didn't do the converersion to
modern Fortran)
My conversion tool, a customized version of F2C, converts all Fortran
character variables to straight C char variables. I would really like
to automatically convert these to C++ std::string variables as I am
doing that by hand. This is the main thing slowing me down.
Changing to printf and friends, or cin/cout? (I find the latter
amost unreadable).
Since I have a builtin Fortran 66 compiler and interpreter in my
software, I may be writing an automated Fortran format and write
statement processor anyway in the near future. So I am thinking about
updating my conversion tool.
That probably makes a lot of sense.
On 4/11/2025 11:00 AM, Steven G. Kargl wrote:[...]
On Fri, 11 Apr 2025 11:37:17 +0200, Bonita Montero wrote:
Am 09.04.2025 um 21:48 schrieb Lynn McGuire:
No, we want to get away from compiling and linking directly.
That is what we use with Open Watcom F77 and C++.
The Watcom stuff is totally outdated.
Is there no way to get something newer ?
You must be new here in c.l.f.-a Lynn has been converting
his 700 KLOC of Fortran to C++ for 2+ decades.-a It seems
his code, which clearly isn't Fortran, can only be compiled
by a Watcom language compiler.-a For those playing along,
that's roughy converting 140 lines of code per workday
with 2 weeks for good behavior (ie., 700000 / (50*5*20)).
I am now well over conversion of 200,000 lines of my 800,000+ Fortran
66/77 code to C++.-a Things are going well other than customer demands
for new features constantly interrupting things.
Changing to printf and friends, or cin/cout? (I find the latter
amost unreadable).
Another useful feature of printf-style formatting is that it allows reordering the input arguments in the output string, which cout does
not. This can be important for internationalization/localization
purposes, to let you write one set of code that will work equally well
in all locales, with output being driven by locale-specific format
strings. cout doesnrCOt lend itself well to that approach.
On 9/24/2026 11:14 AM, Thomas Koenig wrote:
Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
The C++ conversion of the F66 / F77 code has unearthed innumerable old
bugs. It is a wonder that the code has ever worked.
I am not very surprised at that.
Out of curiosity: What types of errors did you find? Was it logic
errors (although those would have been hard to find by conversion
to a different language, unless this caused you to look at old code),
argument mismatch errors, errors in memory handling through COMMON
blocks, ... ?
Most of the code errors that I have found are undersized arrays and
wrong types for variables. An integer where the variable should be
floating point.
And many, many argument mismatches because our Fortran
did not require you to have the same variable type in the callee as the caller.
C++ is much more strongly typed than old Fortran 66/77 is, I do
not know about Fortran 90.
Lawrence DrCOOliveiro <ldo@nz.invalid> writes:
[...]
Another useful feature of printf-style formatting is that it allows
reordering the input arguments in the output string, which cout does
not. This can be important for internationalization/localization
purposes, to let you write one set of code that will work equally well
in all locales, with output being driven by locale-specific format
strings. cout doesnrCOt lend itself well to that approach.
That's a common extension, but not a feature of printf as specified by
the C and C++ standards.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 74 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 121:05:57 |
| Calls: | 1,194 |
| Files: | 1,352 |
| Messages: | 290,204 |