Mercurial > projects > ldc
view test/pointers.d @ 97:c4e161556a21 trunk
[svn r101] Split up CastExp into several smaller utility functions.
author | lindquist |
---|---|
date | Wed, 14 Nov 2007 20:18:01 +0100 |
parents | c53b6e3fe49a |
children |
line wrap: on
line source
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; }