comparison test/pointers.d @ 1:c53b6e3fe49a trunk

[svn r5] Initial commit. Most things are very rough.
author lindquist
date Sat, 01 Sep 2007 21:43:27 +0200
parents
children
comparison
equal deleted inserted replaced
0:a9e71648e74d 1:c53b6e3fe49a
1 module pointers;
2
3 struct S
4 {
5 long l;
6 }
7
8 void main()
9 {
10 int j = 42;
11 int* p = &j;
12
13 auto t = *p;
14 *p ^= t;
15
16 *p = ~t;
17
18 S s;
19 S* sp = &s;
20 *sp = s;
21 s = *sp;
22 }