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 243,139 of 243,242   
   Keith Thompson to Bart   
   Re: printf and time_t   
   03 Feb 26 15:33:44   
   
   From: Keith.S.Thompson+u@gmail.com   
      
   Bart  writes:   
   > On 03/02/2026 22:43, Keith Thompson wrote:   
   >> Tim Rentsch  writes:   
   >> [...]   
   >>> If variable 'u' is declared as uint32_t, a way to print it that is   
   >>> easy and also type-safe is   
   >>>   
   >>>      printf( " u is %lu\n", u+0LU );   
   >>   
   >> I prefer   
   >>   
   >>      printf("u is %lu\n", (unsigned)long_u);   
   >>   
   >> I find it clearer.   
   >   
   > Is there a typo in there, or is the variable actually called 'long_u'?   
   > Then the message doesn't match.   
      
   Yes, that was a typo, a misplaced ')' (not sure how the '_' got there).   
   Thanks for catching it.   
      
   The version I prefer (and I tested it this time) is:   
      
       printf("u is %lu\n", (unsigned long)u);   
      
   --   
   Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com   
   void Void(void) { Void(); } /* The recursive call of the void */   
      
   --- 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