mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-16 12:53:14 +01:00
[svn r5] Initial commit. Most things are very rough.
This commit is contained in:
22
test/pointers.d
Normal file
22
test/pointers.d
Normal file
@@ -0,0 +1,22 @@
|
||||
module pointers;
|
||||
|
||||
struct S
|
||||
{
|
||||
long l;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
int j = 42;
|
||||
int* p = &j;
|
||||
|
||||
auto t = *p;
|
||||
*p ^= t;
|
||||
|
||||
*p = ~t;
|
||||
|
||||
S s;
|
||||
S* sp = &s;
|
||||
*sp = s;
|
||||
s = *sp;
|
||||
}
|
||||
Reference in New Issue
Block a user