![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #1 |
| | |
| |
| | #2 |
|
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.
| |
| |
| | #3 | |
| Quote:
Yes I noticed... thanks for starting it. | ||
| |
| | #4 |
|
Can I mention something that really bugs me. In the document you link to in the wiki, C-Styles it uses the block rem instead of line rem. For example, Code: /*
* 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);
}
![]() ![]() And, this is from a document on C styles! It makes me wonder who wrote it and would advise that you should find a better one. BTW, I love BoostC. Mike. Last edited by Pommie; 29th January 2009 at 02:16 PM. | |
| |
| | #5 |
|
"wrong" so cold. ![]() Correct is open to a lot of interpertation. I programmed professionally for a long time and none of us could agree on much ( this was not in C, where I am a beginner ) Since it is a wiki, why not write a bit about your version of the truth? 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. You will notice that all my block comments are of this form. I have asked the BoostC team to add it to their IDE. If it were up to me I would eliminate the /* */ style of commenting. But I would leave it for those who like it. I put a comment on the end of the line if it comments only that line, I use a block comment for comments that are too long or apply to a block of code. I think it make sense, but opinions differ. We agree about boostc which is a much bigger issue. | |
| |
| | #6 | |
| Quote:
Anyway, welcome to the forum and good job on the wiki. When I get some time I'll try to contribute. Mike. | ||
| |
| | #7 | |
| Quote:
Out of heat, light will come. I am often wrong. But this time..... Thanks for the welcome. | ||
| |
| | #8 |
| | |
| |
| | #9 |
| Have to agree. Using block comments everywhere is just strange.
__________________ ========================= Futz's Microcontrollers & Robotics ========================= | |
| |
| | #10 |
|
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.... | |
| |
| | #11 | |
| Quote:
The opeing brace is a mixed issue in my mind. For teaching I use the open brace on its own line because it is easier to see the code block. At the same time it would be nice to have that line back.
__________________ Please post questions to the forums. PM's are for personal communication. BCHS/3v0's Tutorials Junebug USB PIC programmer kit., USB Bit Whacker, The 15 Minute Printed Circuit Board! (+drill time) | ||
| |
| | #12 |
|
OK you guys are forcing me into full troll* mode, I am going to have to get a bit snarky** with you. I have googled the practice a bit, and that combined with the fact that 3 of 4 posters disagree with me only proves that I am right as the majority is always wrong*** The idea that code should be editable in any old junky editor ( u guys probably like 6 **** ), or even that code should be editable is so 20 th century ( over, yesterday's news..... ) It is tempting to loose (post) this argument on the piclist.com where people seem to think all coding should be in asm unless you are a wimp. They could probably spin this out to 1000 posts. Any of you guys post there? Just what I thought. Finally, if nothing else, my use of footnotes shows the superiority of my view. *The New Hacker's Dictionary **'Snark: It's Mean, It's Personal, and It's Ruining Our Conversation' by David Denby - Los Angeles Times ***Ibsen, Henrik quote - The majority is always wrong; the minority is rarely right.... ****Roman numerals - Wikipedia, the free encyclopedia | |
| |
| | #13 |
| You cannot understand how important sticking to ANSI is until you have to compile a large project with different compilers. // is not ANSI C - sure, most compilers support it but some don't. If you want to "comment out" the aforementioned block of code, just use preprocessor directives: Code: #if 0 /* do some arbitrary thing */ do_something(); #endif | |
| |
| | #14 |
|
I'm going to have to disagree again, quoting a standard set in 1989 as the way it should be done when every C compiler vendor has realized there is a better way is just being pedantic. As this was a thread about pic chips, Microchip recognizes the importance of identifying commented code and turns it green. Code that is commented with a #if does not change colour and so is not immediately recognized as removed. I suspect this is the same for most vendors. I'll be interested if you can identify a compiler that was written in the last 5 years (a millennium in computer terms) that does not support the line comment. Mike. | |
| |
| | #15 |
|
Agreed. I am not a big advocate of strict compliance to ANSI C on microprocessors. The ANSI standard does not address some issures that are important to embedded systems. For this reason sources are specific to the compiler vendor ANSI or not. After a little googling I found the ISO 9899 standard C. Maybe it is less dated then ANSI C. ISO 9899 comliance is required by MISRA C guide. MISRA C guide: In 1998, the UK's Motor Industry Software Reliability Association established a set of 127 guidelines for the use of C in safety-critical systems.It is said the coding in compliance with MISRA-C guidelines is about as close as you can get to an "embedded C" standard. I am going to give it a closer look. 3v0
__________________ Please post questions to the forums. PM's are for personal communication. BCHS/3v0's Tutorials Junebug USB PIC programmer kit., USB Bit Whacker, The 15 Minute Printed Circuit Board! (+drill time) | |
| |
|
| Tags |
| boost, wiki |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| What do you think of an Electronics Wiki site? | ElectroMaster | Chit-Chat | 49 | 12th August 2008 05:59 PM |
| Wiki images | Mikebits | Electronics Wiki | 4 | 8th August 2008 10:04 AM |
| Electronics Wiki - About the site | ElectroMaster | Electronics Wiki | 0 | 7th August 2008 12:51 PM |
| The Junebug featured on the Swordfish BASIC Wiki | blueroomelectronics | Micro Controllers | 4 | 5th July 2008 07:01 AM |
| signal boost+treble boost circuit | mlugg | Electronic Projects Design/Ideas/Reviews | 8 | 30th September 2007 04:10 PM |