About C documentation
Coming from Java environment, I feel I got spoiled a lot when it comes to documentation. In C, using Eclipse, mouseover putchar()
shows:
__CRT_INLINE int __cdecl __MINGW_NOTHROW putchar(int __c)
{
return (--stdout->_cnt >= 0)
? (int) (unsigned char) (*stdout->_ptr++ = (char)__c)
: _flsbuf (__c, stdout);}
While all this is terr开发者_StackOverflowific, I was wondering if any IDE includes more information about the specifics of what a given function does, ie, "prints a character to the output device"? Something similar to this as part of an IDE would be awesome.
Is there a way to get this level of detailed as part of Eclipse or any other IDE?
The question, obviously is not about putchar()
, but rather is about a general approach to documentation using C programming language.
NetBeans will show you the man page inline: http://netbeans.org/kb/docs/cnd/navigating-editing.html
I don't have a solution for eclipse or an IDE, but my approach usually involves googling the function's manpage. eg, man putchar
, which you've already found.
I'll also suggest this, at the risk of downvotes: The IBM C documentation is, in my experience, really good. Often it has real working understandable code examples and everything.
Now, IBM C is different from GNU C, so there are differences or features that do not apply to gcc. That said, Take a look at its page on the putchar() function.
There are plenty of things to complain about in C99, but it is still the authoritative reference and imo the best source for answers to the question, "what does it do?"
MS Visual Studio wraps a little skin around the C99 bones.
And MSDN goes further: docs on MSDN are beginning actually to resemble real papers by real writers that communicate useful info to a wide audience of neophytes and pros alike.
All credit goes to Let_Me_Be.
The following link provides a complete solution to what i was looking for
eclipse.org/linuxtools/projectPages/libhover
精彩评论