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,708 of 243,242   
   Keith Thompson to bart   
   Re: function pointer question   
   02 Jan 26 11:43:01   
   
   From: Keith.S.Thompson+u@gmail.com   
      
   bart  writes:   
   [...]   
   > If you have any function that returns type T (including when T is void   
   > like your examples), then its type is 'function(...)returning T'.   
   >   
   > A pointer to such a function will have a type:   
   >   
   >   'pointer to function(...)returning T'.   
   [...]   
      
   Just to clarify, the "..." refers to the list of parameter types, in   
   this case "pointer to function(char [][64], int, int, const char *)   
   returning void)".  It's not a literal `...` token.   
      
   I mention this because `void func(...)` is valid starting in C23; it's a   
   variadic function with no fixed parameters.  `void func(...)` is not   
   compatible with, for example, `void(int)`.   
      
   --   
   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