source:
tests/expression.cfa
@
6a9d4b4
Last change on this file since 6a9d4b4 was dc8511c, checked in by , 6 years ago | |
---|---|
|
|
File size: 476 bytes |
Rev | Line | |
---|---|---|
[a0dcd2e] | 1 | int main() { |
2 | struct s { int i; } x, *p = &x; | |
3 | int i = 3; | |
[62edde5] | 4 | |
5 | // operators | |
6 | ||
7 | ! i; | |
8 | ~i; | |
9 | +i; | |
10 | -i; | |
11 | *p; | |
12 | ++p; | |
13 | --p; | |
14 | p++; | |
15 | p--; | |
16 | ||
17 | i+i; | |
18 | i-i; | |
19 | i*i; | |
20 | ||
21 | i/i; | |
22 | i%i; | |
23 | i^i; | |
24 | i&i; | |
25 | i|i; | |
26 | i<i; | |
27 | i>i; | |
28 | i=i; | |
29 | ||
30 | i==i; | |
31 | i!=i; | |
32 | i<<i; | |
33 | i>>i; | |
34 | i<=i; | |
35 | i>=i; | |
36 | i&&i; | |
37 | i||i; | |
38 | p->i; | |
39 | i*=i; | |
40 | i/=i; | |
41 | i%=i; | |
[a0dcd2e] | 42 | i+=i; |
43 | i-=i; | |
[62edde5] | 44 | i&=i; |
45 | i|=i; | |
46 | i^=i; | |
47 | i<<=i; | |
48 | i>>=i; | |
49 | ||
50 | i?i:i; | |
[a0dcd2e] | 51 | } // main |
Note: See TracBrowser
for help on using the repository browser.