File: x.cxx.folded

package info (click to toggle)
scite 5.5.8-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 20,176 kB
  • sloc: cpp: 175,852; ansic: 21,482; python: 7,014; makefile: 934; sh: 257; perl: 252; ruby: 217; sql: 194; php: 63; vhdl: 51; erlang: 47; objc: 22; modula3: 21; cobol: 18; lisp: 18; asm: 17; fortran: 12; ml: 11; xml: 7; tcl: 6
file content (93 lines) | stat: -rw-r--r-- 2,624 bytes parent folder | download | duplicates (2)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
 0 400 400   #!/usr/bin/env node
 1 400 400   
 0 400 400   // A demonstration program
 0 400 400   #include <stdio.h>
 2 400 401 + #if 0 /* */
 0 401 401 | #define DUMMY() \
 0 401 401 | 	if (1);
 0 401 400 | #endif
 1 400 400   
 0 400 400   // Test preprocessor expressions with parentheses 
 2 400 401 + #if ((0))
 0 401 401 | a
 0 401 401 | #elif ((1))
 0 401 401 | b
 0 401 400 | #endif
 1 400 400   
 2 400 401 + /** @file LexCPP.cxx
 0 401 401 |  <file>
 0 401 401 |  <file >filename</file>
 0 401 401 |  LexCPP.cxx.
 0 401 401 |  </file>
 0 401 400 |  **/
 1 400 400   
 2 400 401 + /** Unknown doc keywords so in SCE_C_COMMENTDOCKEYWORDERROR:
 0 401 401 |  @wrong LexCPP.cxx
 0 401 401 |  <wrong>filename</wrong>
 0 401 401 |  Next line should not start a keyword but before 5.4.1 did and caused bad styling or a crash depending on range lexed
 0 401 401 |  <
 0 401 400 | **/
 1 400 400   
 0 400 400   #define M\
 1 400 400   
 0 400 400   \
 1 400 400    
 1 400 400   
 0 400 400   // Test preprocessor active branches feature
 1 400 400   
 2 400 401 + #if HAVE_COLOUR
 0 401 401 | // Active
 0 401 400 | #endif
 2 400 401 + #if NOT_HAVE_COLOUR
 0 401 401 | // Inactive
 0 401 400 | #endif
 1 400 400   
 2 400 401 + #if FEATURE==2
 0 401 401 | // Active
 0 401 400 | #endif
 2 400 401 + #if FEATURE==3
 0 401 401 | // Inactive
 0 401 400 | #endif
 1 400 400   
 2 400 401 + #if VERSION(1,2)==3
 0 401 401 | // Active
 0 401 400 | #endif
 2 400 401 + #if VERSION(1,2)==4
 0 401 401 | // Inactive
 0 401 400 | #endif
 1 400 400   
 0 400 400   #undef HAVE_COLOUR
 2 400 401 + #if HAVE_COLOUR
 0 401 401 | // Inactive
 0 401 400 | #endif
 1 400 400   
 0 400 400   #define MULTIPLY(a,b) a*b
 2 400 401 + #if MULTIPLY(2,3)==6
 0 401 401 | // Active
 0 401 400 | #endif
 1 400 400   
 0 400 400   #define ONE 1
 2 400 401 + #if ONE != 1
 0 401 401 | // Inactive
 0 401 400 | #endif
 1 400 400   
 2 400 401 + int main() {
 0 401 401 | 	double x[] = {3.14159,6.02e23,1.6e-19,1.0+1};
 0 401 401 | 	int y[] = {75,0113,0x4b};
 0 401 401 | 	printf("hello world %d %g\n", y[0], x[0]);
 1 401 401 | 
 0 401 401 | 	// JavaScript regular expression (14) tests
 0 401 401 | 	let a = /a/;
 0 401 401 | 	let b = /[a-z]+/gi;
 0 401 401 | 	/a|b/i.test("baby");
 0 401 401 | 	// arrow function
 0 401 401 | 	() => /a|b/i.test("baby");
 1 401 401 | 
 0 401 401 | 	// Escape sequence (27) tests
 0 401 401 | 	printf("\'\"\?\\\a\b\f\n\r\t\v \P");
 0 401 401 | 	printf("\0a \013a \019");
 0 401 401 | 	printf("\x013ac \xdz");
 0 401 401 | 	printf("\ua34df \uz");
 0 401 401 | 	printf("\Ua34df7833 \Uz");
 0 401 400 | }
 1 400 400