home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.arch      Apparently more than just beeps & boops      131,241 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 129,833 of 131,241   
   John Levine to All   
   Re: sign/zero/garbage extension (was: Ti   
   05 Oct 25 19:30:42   
   
   From: johnl@taugh.com   
      
   According to Anton Ertl :   
   >On the PDP-11 C's int is 16 bits.  I don't know what FORTRAN's INTEGER   
   >is on the PDP-11 (but I remember reading about INTEGER*2 and   
   >INTEGER*4, AFAIK not in a PDP-11 context).  In any case, I expect that   
   >FORTRAN's REAL was 32-bit on a PDP-11, and that any rule chain that   
   >requires that C's int is as wide as FORTRAN's REAL is broken at some   
   >point on the PDP-11.   
      
   I wrote INFort, one of the two F77 implementations for the PDP-11.   
   INTEGER and REAL were the same size because that's what the standard   
   said, and any program that used EQUIVALENCE would break otherwise. If   
   you wanted shorter ints, INTEGER*2 provided them.   
      
   Bell Labs independently wrote f77 around the same time, and its manual says   
   they did the same thing, INTEGER was C long int, INTEGER*2 was short int.   
      
   If the speed difference mattered, it wasn't hard to say something like   
      
         IMPLICIT INTEGER*2(I-N)   
      
   to make your ints short.   
      
      
      
   --   
   Regards,   
   John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for   
   Dummies",   
   Please consider the environment before reading this e-mail. https://jl.ly   
      
   --- 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