On 12/5/2023 10:14 AM, Russell King (Oracle) wrote: > On Tue, Dec 05, 2023 at 09:44:05AM -0800, Jeff Johnson wrote: >> So in my experience a function prototype IS the function definition, and >> the actual function is just the implementation of that definition. >> >> But that thinking obviously isn't shared by others. > > Interestingly, the view that a function prototype is a function > definition does not seem to be shared by w3school, Microsoft, IBM, > and many more. > > If we look at the C99 standard, then 6.9.1 Function definitions gives > the syntax as including a compound-statement, which is defined as > requiring the curley braces and contents. Therefore, a function > definition as defined by the C standard includes its body. > Note I was speaking in terms of functional languages in general, not C specifically. Perhaps I should have used the term "specification" instead of "definition" (which would align with the Ada terminology). Having worked with closed-source systems, especially VxWorks, for many years (where the header files contain all the documentation), it just seems strange to embed the documentation in the .c files. /jeff