source:
doc/proposals/modules-gen-hdr/hello/b.src.c
Last change on this file was b28ce93, checked in by , 3 months ago | |
---|---|
|
|
File size: 575 bytes |
Line | |
---|---|
1 | #import auto a |
2 | |
3 | //# @ |
4 | struct b { |
5 | struct a y; |
6 | }; |
7 | |
8 | //# $v |
9 | struct a glb_ba = { 20 }; |
10 | |
11 | //# $v |
12 | struct b glb_bb = { { 30 } }; |
13 | |
14 | //# $f |
15 | void f_b( struct b p ) { |
16 | int printf( const char *, ... ); // scaffold |
17 | printf( "f_b( b{ { %d } } )\n", p.y.x ); |
18 | printf( "\tglb_a == { %d }\n", glb_a.x); |
19 | printf( "\tglb_ba == { %d }\n", glb_ba.x); |
20 | printf( "\tglb_bb == { { %d } }\n", glb_bb.y.x ); |
21 | glb_a.x += 1; |
22 | p.y.x += 1; |
23 | f_a( p.y ); |
24 | #ifdef ERR1 |
25 | help(); // reject => a's `#import static helper` not visible here |
26 | #endif |
27 | printf( "f_b end\n" ); |
28 | } |
Note:
See TracBrowser
for help on using the repository browser.