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,702 of 243,242   
   Kaz Kylheku to Michael Sanders   
   Re: function pointer question   
   02 Jan 26 17:48:16   
   
   From: 046-301-5902@kylheku.com   
      
   On 2026-01-02, Michael Sanders  wrote:   
   > B: because every function must have a return type   
   >    *including function pointers*?   
      
   What it is you think type is, in the context of C?   
      
   Does type survive into run-time?   
      
   If a function pointer is missing type information about return type, and   
   that function pointer is needed for expressing a function call, where   
   does the compiler get the type from?   
      
   > C: what about tyedef?   
      
   What do you think /that/ is?   
      
   The typedef declaration is a way of introducing a name, which names a   
   type, and can then be used in a declaration, or in the cast notation.   
   The name is an alias for that type.   
      
   typedef isn't a type defining mechanism; it is a mechanism for defining   
   alias names for types ("typedef names" or "typedefs"). The types that   
   are aliased by typedef names are specified in the ordinary declaration   
   syntax, the same as like when a variable is being declared rather than a   
   typedef name.   
      
   Syntactically, typedef is a "storage class specifier", like "extern"   
   or "static". Thus "extern typedef int x" would never make sense,   
   due to storage class specifiers being exclusive.   
      
   --   
   TXR Programming Language: http://nongnu.org/txr   
   Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal   
   Mastodon: @Kazinator@mstdn.ca   
      
   --- 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