Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.fortran    |    Putting John Backus on a giant pedestal    |    5,127 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 4,946 of 5,127    |
|    Steven G. Kargl to Lawrence D'Oliveiro    |
|    Re: converting a 700,000+ line Fortran 7    |
|    16 Apr 25 17:24:26    |
      XPost: comp.lang.c++       From: sgk@REMOVEtroutmask.apl.washington.edu              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              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca