Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
9c7d183a
Commit
9c7d183a
authored
Jun 24, 2015
by
stijn
Committed by
Damien George
Jun 24, 2015
Browse files
CODECONVENTIONS.md: Add function/variable/argument naming convention
parent
d02f6717
Changes
1
Hide whitespace changes
Inline
Side-by-side
CODECONVENTIONS.md
View file @
9c7d183a
...
...
@@ -36,6 +36,9 @@ Header files:
-
Header files should be protected from multiple inclusion with #if
directives. See an existing header for naming convention.
Function, variable and argument names:
-
Use underscore_case, not camelCase for all names.
Type names and declarations:
-
When defining a type, put '_t' after it.
...
...
@@ -53,16 +56,16 @@ general guidelines are:
Examples
--------
Braces and
spac
es:
Braces
, spaces
and
nam
es:
int foo(int x, int
y
) {
if (x <
y
) {
foo(
y
, x);
int foo
_function
(int x, int
some_value
) {
if (x <
some_value
) {
foo(
some_value
, x);
} else {
foo(x + 1,
y
- 1);
foo(x + 1,
some_value
- 1);
}
for (int
i = 0; i < x; i
++) {
for (int
my_counter = 0; my_counter < x; my_counter
++) {
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment