forked from openFrameworks-RaspberryPi/openFrameworks
-
Notifications
You must be signed in to change notification settings - Fork 0
oF code style
bilderbuchi edited this page Sep 27, 2011
·
40 revisions
- 4 spaces are used for indentation
- Spaces, not tabs!
-
Declare each variable on a separate line
-
Avoid short (e.g. “a”, “rbarr”, “nughdeget”) names whenever possible
-
Single character variable names are only okay for counters and temporaries, where the purpose of the variable is obvious
-
Wait when declaring a variable until it is needed // Wrong int a, b; char *c, *d;
// Correct int height; int width; char *nameOfThis; char *nameOfThat;