root/trunk/src/tutorials/examples/dm_D_29598/struct1.d

Revision 6, 226 bytes (checked in by jcc7, 3 years ago)

Made more progress in developing convertToWiki and added some files.

Line 
1 struct Foo
2 {
3     int x;
4 }
5
6 void test(Foo foo)
7 {
8     size_t o;
9
10     o = Foo.x.offsetof;   // error, .offsetof an int type
11     //o = foo.x.offsetof;   // yields 8
12 }
13
14 void main()
15 {
16     Foo f;
17     test(f);   
18 }
Note: See TracBrowser for help on using the browser.