source:
doc/theses/rob_schluntz_MMath/examples/variadic/print.c@
d0a00a5a
| Last change on this file since d0a00a5a was 67982887, checked in by , 7 years ago | |
|---|---|
|
|
| File size: 267 bytes | |
| Line | |
|---|---|
| 1 | forall(otype T, ttype Params | |
| 2 | { void print(T); void print(Params); }) |
| 3 | void print(T arg, Params rest) { |
| 4 | print(arg); |
| 5 | print(rest); |
| 6 | } |
| 7 | void print(const char * x) { printf("%s", x); } |
| 8 | void print(int x) { printf("%d", x); } |
| 9 | int main() { |
| 10 | print("x = ", 123, "."); |
| 11 | } |
Note:
See TracBrowser
for help on using the repository browser.