home bbs files messages ]

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,703 of 5,127   
   Lynn McGuire to R Daneel Olivaw   
   Re: Is there a way in Fortran to designa   
   03 Oct 24 14:34:01   
   
   From: lynnmcguire5@gmail.com   
      
   On 10/3/2024 12:02 PM, R Daneel Olivaw wrote:   
   > Steven G. Kargl wrote:   
   >> On Thu, 03 Oct 2024 14:45:31 +0200, R Daneel Olivaw wrote:   
   >>   
   >>> Lynn McGuire wrote:   
   >>>> I need many of my integers to be integer*8 in my port to 64 bit.  In   
   >>>> C/C++ code, I can say 123456L to mean a long long value, generally 64   
   >>>> bit.  Is there a corresponding way to do this in Fortran or am I stuck   
   >>>> with:   
   >>>>   
   >>>>       call xyz (1)   
   >>>>   
   >>>>       subroutine xyz (ivalue)   
   >>>>       integer*8 ivalue   
   >>>>       ...   
   >>>>       return end   
   >>>>   
   >>>> must be:   
   >>>>   
   >>>>       integer*8 ivalue   
   >>>>       ...   
   >>>>       ivalue = 1   
   >>>>       call xyz (ivalue)   
   >>>>   
   >>>   
   >>> This is not actually a Fortran issue as such, it's all about a specific   
   >>> compiler (GNU Fortran).   
   >>   
   >> If we overlook the nonstandard type in the declaration, and agree   
   >> that the compiler will accept 'integer*8', then the program is   
   >> still invalid Fortran.  It's technically not a Fortran issue.  It   
   >> is a programmer issue.   
   >>   
   >   
   > Take a pragmatic approach, if that's the way the compiler wants you to   
   > do it then do it that way.   
   > Years ago I was converting a suite of programs from one OS/hardware   
   > platform to another.  One program had serious problems because type   
   > "real" had insufficient precision on the new machine, that machine   
   > offered a compile option which meant "real" automatically meant "double   
   > precision" and - after checking for "equivalence" and common" statements   
   > - that's the way I went.  Problem solved.  This was back in the days of   
   > Fortran IV but I don't think I've ever seen anyone assigning Hollerith   
   > values to Real numbers so that was not a problem either.   
      
   My code used to assign Hollerith to Real numbers but I ripped that out   
   years ago in a project to get rid of Hollerith.   
      
   Lynn   
      
   --- 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