aboutsummaryrefslogtreecommitdiffstats
path: root/CODINGSTYLE
blob: 3ac6e3b77af55303b3fb4ff2daaa109ec79a83b3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
recommended:
	tab = 5
	shiftwidth = 5

required:
	use tab character for indents

	for (init; condition; increment) {
		statement;
	}

	switch (variable) {
	case 1:
		statement;
		break;
	case 2:
		statement;
		break;
	default:
		statement;
		break;
	}

	if (condition)
		statement;
	else	statement;

	if (condition) {
		statement;
		statement;
	}
	else {
		statement;
		statement;
	}

	class ClassDef {
	private:
	protected:
		void method(int param1, char param2);
	public:
		ClassDef();
	};

	ClassDef classDef;
	classDef.method(1, '2');

	var1      = 1;
	variable2 = 2;
	var3      = 3;
	variable4 = 4;