Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2

Liste des GroupesRevenir à cl fortran 
Sujet : Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2
De : sgk (at) *nospam* REMOVEtroutmask.apl.washington.edu (Steven G. Kargl)
Groupes : comp.lang.fortran comp.lang.c++
Date : 16. Apr 2025, 18:24:26
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vtop49$2lndj$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Pan/0.145 (Duplicitous mercenary valetism; d7e168a git.gnome.org/pan2)
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'.

--
steve

Date Sujet#  Auteur
8 Apr 25 * converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 234Lynn McGuire
9 Apr 25 +* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 24Sam
9 Apr 25 i`* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 23Lynn McGuire
10 Apr 25 i `* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 22Michael S
10 Apr 25 i  `- Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 21Lynn McGuire
9 Apr 25 +* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 22Chris M. Thomasson
9 Apr 25 i`- Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 21Lynn McGuire
9 Apr 25 +* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 225Lawrence D'Oliveiro
9 Apr 25 i`* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 224Lynn McGuire
10 Apr 25 i +* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 26Lawrence D'Oliveiro
10 Apr 25 i i`* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 25Lynn McGuire
10 Apr 25 i i `* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 24Lawrence D'Oliveiro
10 Apr 25 i i  `* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 23Lynn McGuire
11 Apr 25 i i   `* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 22Thomas Koenig
11 Apr 25 i i    `- Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 21Lawrence D'Oliveiro
11 Apr 25 i `* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 217Bonita Montero
11 Apr 25 i  `* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 216Steven G. Kargl
11 Apr 25 i   +* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 22James Kuyper
11 Apr 25 i   i`- Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 21Steven G. Kargl
11 Apr 25 i   +- Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 21Lynn McGuire
11 Apr 25 i   `* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 212Lynn McGuire
13 Apr 25 i    `* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 211Lynn McGuire
14 Apr 25 i     `* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 210Lawrence D'Oliveiro
15 Apr 25 i      `* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 29Lynn McGuire
16 Apr 25 i       `* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 28Lawrence D'Oliveiro
16 Apr 25 i        `* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 27Lynn McGuire
16 Apr 25 i         +* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 25Lawrence D'Oliveiro
16 Apr 25 i         i+* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 23Steven G. Kargl
17 Apr 25 i         ii`* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 22R Daneel Olivaw
17 Apr 25 i         ii `- Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 21Steven G. Kargl
16 Apr 25 i         i`- Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 21Lynn McGuire
16 Apr 25 i         `- Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 21Lynn McGuire
22 Apr05:53 `* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 22David Duffy
22 Apr06:14  `- Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 21Lynn McGuire

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal