Arduino Forum

Using Arduino => Introductory Tutorials => Topic started by: rickam1 on May 29, 2018, 11:48 pm

Title: suggestions for the Arduino style guide.
Post by: rickam1 on May 29, 2018, 11:48 pm
I liked what you all did in putting together a style guide and I think it will be very helpful for me as I try to put together my sketch code including the schematic - the pictorial - and perhaps even a flow diagram. I had a friend over the other day and he explained to me how software engineers use tabs to indent sections of code to make it more readable to other software engineers. I noticed that was done in some of the examples but it was not intuitive until explained. Perhaps this might be a good add to the existing style guide.  :-) 
Thanks
Rick, Rickam1@Verizon.net
Title: Re: suggestions for the Arduino style guide.
Post by: DrAzzy on May 30, 2018, 07:37 am
Ctrl+T will reformat the sketch with proper tabs, if you weren't aware of that. It's very useful, particularly for finding problems with mismatched braces and the like/.
Title: Re: suggestions for the Arduino style guide.
Post by: lastchancename on May 30, 2018, 12:08 pm
Style is quite subjective, but I like your idea, and was toying with something similar in the recent past...

There are some 'standards' as you say, like indenting, but even then - more than one team plays by their own rules...!

caPitAlisation, under_scores, object-names and the use of global variables all have their own style followers.  Apart from readability, there are factors like memory use and performance that might affect choices in any single situation.