home bbs files messages ]

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

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

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

   Message 242,801 of 243,242   
   James Kuyper to Michael S   
   Re: printf and time_t   
   05 Jan 26 13:14:12   
   
   From: jameskuyper@alumni.caltech.edu   
      
   On 2026-01-05 03:51, Michael S wrote:   
   ....   
   > I can't think about situation in which casting time_t value to 'long   
   > long' can go wrong.   
      
   If time_t is a floating point type, or even an extended integer type   
   with a greater range than long long, or even simply unsigned long long,   
   the value could be too large to store in long long, in which case the   
   conversion has undefined behavior. If time_t is a flaoting point type,   
   another problem is that the conversion will discard the fractional part   
   of the value. Depending upon how time_t is scaled, that might result is   
   a large error.   
      
   --- 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