source:
doc/theses/rob_schluntz/examples/tuples/ctor.c@
1ed958c3
| Last change on this file since 1ed958c3 was 728df66, checked in by , 8 years ago | |
|---|---|
|
|
| File size: 191 bytes | |
| Rev | Line | |
|---|---|---|
| [9c14ae9] | 1 | struct S { int x; double y; }; |
| 2 | [void] ?{}(* [int, double] this, S s) { | |
| 3 | this->0 = s.x; | |
| 4 | this->1 = s.y; | |
| 5 | } | |
| 6 | int main() { | |
| 7 | S s = { 123, 345 }; | |
| 8 | [int, double] x = s; | |
| 9 | printf("%d %g\n", x); | |
| 10 | } |
Note:
See TracBrowser
for help on using the repository browser.