summaryrefslogtreecommitdiff
path: root/CODINGSTYLE
blob: 63a9bf9c356aefff6e2eb0415cbe426985d4455c (plain)
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
52
53
54
recommended:
	tab = 5
	shiftwidth = 5

required:
	use tab character for indents

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

	switch (variable) {
	case 1:
		statement;
		statement;
		break;
	case 2: statement; break;
	case 3: statement; break;
	case 4:
		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;