#import auto b #import static helper //# @ struct c { struct b z; struct a q; }; //# $v struct a glb_ca = { 40 }; //# $v struct b glb_cb = { { 50 } }; //# $v struct c glb_cc = { { { 60 } }, { 70 } }; //# $f void f_c( struct c p ) { int printf( const char *, ... ); // scaffold printf( "f_c( c{ b{ a{ %d } }, a{ %d } } )\n", p.z.y.x, p.q.x ); printf( "\tglb_a == a{ %d }\n", glb_a.x); printf( "\tglb_ba == a{ %d }\n", glb_ba.x); printf( "\tglb_bb == b{ a{ %d } }\n", glb_bb.y.x ); printf( "\tglb_ca == a{ %d }\n", glb_ca.x); printf( "\tglb_cb == b{ a{ %d } }\n", glb_cb.y.x ); printf( "\tglb_cc == c{ b{ a{ %d } }, a{ %d } }\n", glb_cc.z.y.x, glb_cc.q.x ); glb_a.x += 1; glb_ba.x += 1; glb_bb.y.x += 1; p.z.y.x += 1; p.q.x += 1; f_b( p.z ); f_a( p.q ); help(); // accept => a's `#import static helper` independent from here printf( "f_c end\n" ); } //# $f int main() { struct a la = { 500 }; struct b lb = { { 600 } }; struct c lc = { { { 700 } }, { 800 } }; f_a(la); f_b(lb); f_c(lc); }