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,145 of 243,242   
   Bart to Keith Thompson   
   Re: printf and time_t   
   04 Feb 26 23:52:12   
   
   From: bc@freeuk.com   
      
   On 04/02/2026 23:39, Keith Thompson wrote:   
   > Bart  writes:   
   > [...]   
   >> The problem is that C expects an exact format-code when trying to use   
   >> *printf functions, and for that you need to know the exact types of   
   >> the expressions being passed. For example:   
   >>   
   >>    uintptr_t x;                    // from above examples   
   >>    double y;                       //   
   >>    printf("x * y is %?", x * y);   // What's '?'   
   >   
   > Since you asked...   
   >   
   > '?' is 'f' (or 'g' or 'e', or 'a', or any of those in upper case).   
   > `x * y` is of type double.   
      
   The 'from above examples' applies to both x and y. That means that   
   'double' /may/ have been redefined like this (from my post):   
      
      #ifdef SQLITE_OMIT_FLOATING_POINT   
      # define double sqlite3_int64   
      #endif   
      
   I don't know what 'sqlite3_int64' is, but it sounds like a signed integer.   
      
   I was asked to give examples of conditional types, and thought it best   
   to do so from actual programs.   
      
   --- 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