Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I am the author of a good bit of it. It is still new and small, we could use some help adding to it. Also consider linking topics here to it, if they are good reference topics. Forums and Wikis are complementary sources, Forums for q and a and discussion, Wiki's for "resolved' issues.
/*
* Find the last element in the linked list
* pointed to by nodep and return a pointer to it.
* Return NULL if there is no last element.
*/
node_t *
tail(nodep)
node_t *nodep; /* pointer to head of list */
{
register node_t *np; /* advances to NULL */
register node_t *lp; /* follows one behind np */
if (nodep == NULL)
return (NULL);
for (np = lp = nodep; np != NULL; lp = np, np = np->next)
; /* VOID */
return (lp);
}
To answer your question block comments should be implemented by the IDE, highlight the area to comment and press something <buttion, icon, magic key>, each line is commented by a // at the beginning of the line. See netbeans for one of the many ide's that does this.
We'll have to agree to differ on this point, C files are text files and should be editable in any text editor. The idea of an IDE that block rems by using line rem is just as bad as the opposite way around. When I unrem it, how will the IDE know which lines I want left commented? The two types of comments were designed into the language because both are needed.
Anyway, welcome to the forum and good job on the wiki. When I get some time I'll try to contribute.
Mike.
Out of heat, light will come. I am often wrong. But this time.....
Have to agree. Using block comments everywhere is just strange.This is just so annoying and wrong. Single line comments should use the line comment (//) not the block comment.
I agree on the comments.I've downloaded that PDF, and will have to take a look.
I do agree, that block comments on a line are annoying...
and I prefer the opening brace on the same line, rather than the line below, but then I think that issue is style....
This is just so annoying and wrong
#if 0
/* do some arbitrary thing */
do_something();
#endif
Microchip recognizes the importance of identifying commented code and turns it green... I suspect this is the same for most vendors.