I am back on this project again. I have converted over 100,000 lines of the F77 code to C++ now and am debugging character string issues.
I tried GFortran and GCC with Simply Fortran for a long while but the debugging is simply horrible.
On 4/9/2025 2:18 AM, Lawrence D'Oliveiro wrote:
On Tue, 8 Apr 2025 15:06:06 -0500, Lynn McGuire wrote:
I tried GFortran and GCC with Simply Fortran for a long while but the
debugging is simply horrible.
Have you tried using the GNU tools (gfortran, gcc, gdb etc) directly,
leaving out the Simply Fortran middleman?
No, we want to get away from compiling and linking directly. That is
what we use with Open Watcom F77 and C++.
With over 5,000 subroutines, each in their own file, keeping track of everything is difficult on a good day.
On 4/8/2025 7:34 PM, Sam wrote:
Lynn McGuire writes:
I am back on this project again. I have converted over 100,000
lines of the F77 code to C++ now and am debugging character string
issues.
Thanks for the update. Good job. Here's a cookie for you. Keep up
the good work.
Sigh, the virtual cookie sucked. And I am on a diet and not supposed
to eat cookies for a long while.
Lynn
On 4/9/2025 7:35 PM, Lawrence D'Oliveiro wrote:
This is why you have build systems.
I started using the first IDE (interactive development environment) in
1983 ??? with Turbo Pascal. $49 IIRC. It was a simply amazing way of
doing things. Nowadays, Visual Studio comes closest to the Turbo Pascal
IDE but even it is not quite there. Visual Studios lack of a decent
Fortran compiler sucks.
I moved back to build systems on the Apollo Domain in 1989 using DSEE
but it was a downer compared to Turbo Pascal. It did allow multiple
user development teams to work together though. We only had a few
hallway fights on code conflicts, most were resolved by DSEE.
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 ?
On 4/11/25 12:00, Steven G. Kargl wrote:
...
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
This is cross-posted to comp.lang.c++, which is where I'm seeing it.
It's not very important, but I'm curious as to what about his code makes
it clearly not Fortran code. Has he conceded that it isn't actually
fortran? The Subject of this thread implies otherwise.
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
And don't forget that we spent a lot of time updating the code by
converting all of the Hollerith characters to character strings.
Got rid of a few nasty bugs like:
iword = 6Habcdef
On 4/15/2025 6:14 PM, Lawrence D'Oliveiro wrote:
On Mon, 14 Apr 2025 23:50:32 -0500, Lynn McGuire wrote:
Got rid of a few nasty bugs like:
iword = 6Habcdef
Surely whether that’s a bug or not would depend on the type of
“iword” ...
iword is a implicit 4 byte integer capable of storing 4 characters.
On 4/15/2025 6:14 PM, Lawrence D'Oliveiro wrote:
On Mon, 14 Apr 2025 23:50:32 -0500, Lynn McGuire wrote:
Got rid of a few nasty bugs like:
iword = 6Habcdef
Surely whether that’s a bug or not would depend on the type of “iword” >> ...
iword is a implicit 4 byte integer capable of storing 4 characters.
On Tue, 15 Apr 2025 18:28:31 -0500, Lynn McGuire wrote:
On 4/15/2025 6:14 PM, Lawrence D'Oliveiro wrote:
On Mon, 14 Apr 2025 23:50:32 -0500, Lynn McGuire wrote:
Got rid of a few nasty bugs like:
iword = 6Habcdef
Surely whether that’s a bug or not would depend on the type of “iword”
...
iword is a implicit 4 byte integer capable of storing 4 characters.
I thought you got rid of all the implicit typing.
On Wed, 16 Apr 2025 07:44:08 +0000, Lawrence D'Oliveiro wrote:
On Tue, 15 Apr 2025 18:28:31 -0500, Lynn McGuire wrote:
On 4/15/2025 6:14 PM, Lawrence D'Oliveiro wrote:
On Mon, 14 Apr 2025 23:50:32 -0500, Lynn McGuire wrote:
Got rid of a few nasty bugs like:
iword = 6Habcdef
Surely whether that’s a bug or not would depend on the type of “iword”
...
iword is a implicit 4 byte integer capable of storing 4 characters.
I thought you got rid of all the implicit typing.
Implicit typing has nothing do with numeric storage size.
program foo
use iso_fortran_env, only : numeric_storage_size
integer :: j = 0
i = 6Habcdef ! i has an implicit type of default integer kind
j = 6Habcdef ! j has an explicit type of default integer kind
print *, i, j
print *, numeric_storage_size
end program foo
% gfcx -std=legacy -o z a.f90
% ./z
1684234849 1684234849
32
Many (most? all?) systems today likely have a 4-byte internal
representation for a default integer. The Fortran standard simply
states that 'i' and 'j' occupy one numeric storage unit. Here,
the size of that unit is 32 bits.
PS: The gfortran's -Wall option reports a few warnings with
the above code.
% gfcx -std=legacy -o z -Wall a.f90
a.f90:26:7:
26 | i = 6Habcdef
| 1
Warning: Conversion from HOLLERITH to INTEGER(4) at (1)
[-Wconversion]
a.f90:26:7:
26 | i = 6Habcdef
| 1
Warning: The Hollerith constant at (1) is truncated in
conversion to 'INTEGER(4' [-Wcharacter-truncation]
and similar warnings for 'j'.
Steven G. Kargl wrote:
On Wed, 16 Apr 2025 07:44:08 +0000, Lawrence D'Oliveiro wrote:
On Tue, 15 Apr 2025 18:28:31 -0500, Lynn McGuire wrote:
On 4/15/2025 6:14 PM, Lawrence D'Oliveiro wrote:
On Mon, 14 Apr 2025 23:50:32 -0500, Lynn McGuire wrote:
Got rid of a few nasty bugs like:
iword = 6Habcdef
Surely whether that’s a bug or not would depend on the type of “iword”
...
iword is a implicit 4 byte integer capable of storing 4 characters.
I thought you got rid of all the implicit typing.
Implicit typing has nothing do with numeric storage size.
program foo
use iso_fortran_env, only : numeric_storage_size
integer :: j = 0
i = 6Habcdef ! i has an implicit type of default integer kind
j = 6Habcdef ! j has an explicit type of default integer kind
print *, i, j
print *, numeric_storage_size
end program foo
I believe you'll find that some of that syntax did not exist under
Fortran 77, in particular the "use" line.
Did Lynn convert to F90 first?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 493 |
Nodes: | 16 (2 / 14) |
Uptime: | 08:07:21 |
Calls: | 9,710 |
Files: | 13,740 |
Messages: | 6,181,282 |