Sujet : Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2
De : Danni (at) *nospam* hyperspace.vogon.gov (R Daneel Olivaw)
Groupes : comp.lang.fortran comp.lang.c++Date : 17. Apr 2025, 11:24:22
Autres entêtes
Organisation : To protect and to server
Message-ID : <vtqksm$27fh1$1@paganini.bofh.team>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 SeaMonkey/2.53.20
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
% 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'.
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?
Date | Sujet | # | | Auteur |
8 Apr 25 | converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 34 | | Lynn McGuire |
9 Apr 25 |  Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 4 | | Sam |
9 Apr 25 |   Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 3 | | Lynn McGuire |
10 Apr 25 |    Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 2 | | Michael S |
10 Apr 25 |     Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 1 | | Lynn McGuire |
9 Apr 25 |  Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 2 | | Chris M. Thomasson |
9 Apr 25 |   Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 1 | | Lynn McGuire |
9 Apr 25 |  Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 25 | | Lawrence D'Oliveiro |
9 Apr 25 |   Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 24 | | Lynn McGuire |
10 Apr 25 |    Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 6 | | Lawrence D'Oliveiro |
10 Apr 25 |     Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 5 | | Lynn McGuire |
10 Apr 25 |      Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 4 | | Lawrence D'Oliveiro |
10 Apr 25 |       Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 3 | | Lynn McGuire |
11 Apr 25 |        Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 2 | | Thomas Koenig |
11 Apr 25 |         Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 1 | | Lawrence D'Oliveiro |
11 Apr 25 |    Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 17 | | Bonita Montero |
11 Apr 25 |     Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 16 | | Steven G. Kargl |
11 Apr 25 |      Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 2 | | James Kuyper |
11 Apr 25 |       Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 1 | | Steven G. Kargl |
11 Apr 25 |      Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 1 | | Lynn McGuire |
11 Apr 25 |      Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 12 | | Lynn McGuire |
13 Apr 25 |       Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 11 | | Lynn McGuire |
14 Apr 25 |        Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 10 | | Lawrence D'Oliveiro |
15 Apr 25 |         Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 9 | | Lynn McGuire |
16 Apr 25 |          Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 8 | | Lawrence D'Oliveiro |
16 Apr 25 |           Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 7 | | Lynn McGuire |
16 Apr 25 |            Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 5 | | Lawrence D'Oliveiro |
16 Apr 25 |             Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 3 | | Steven G. Kargl |
17 Apr 25 |              Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 2 | | R Daneel Olivaw |
17 Apr 25 |               Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 1 | | Steven G. Kargl |
16 Apr 25 |             Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 1 | | Lynn McGuire |
16 Apr 25 |            Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 1 | | Lynn McGuire |
22 Apr05:53 |  Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 2 | | David Duffy |
22 Apr06:14 |   Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2 | 1 | | Lynn McGuire |