Style guide - BelaPlatform/Bela GitHub Wiki
This material has been superseded. Visit learn.bela.io for the maintained version.
Style guide
You are welcome to contribute to this repository. If you decide to, please follow our style guide (which we have not followed thoroughly ourselves so far, but we are trying to improve).
- use tabs for indentation
- space around every mathematical/binary operator (=, *, +, <<, etc.)
- but no space inside parens --->
if(a == 2) not if( a == 2 ) nor if(a==2)
- space between comment symbol and beginning of text:
// Like this
- comments aligned to same indentation as the code
- Pre-processor directives should be at the beginning of line.
- documentation in the .h files using Doxygen syntax