terps/tads/tads3/test/data/extfunc1.t
raw| 1 | /* |
| 2 | * test of 'extern function' declarations |
| 3 | */ |
| 4 | |
| 5 | #include "tads.h" |
| 6 | |
| 7 | extern function test1(a, b, c); |
| 8 | extern function test2(d, e); |
| 9 | |
| 10 | function _main(args) |
| 11 | { |
| 12 | tadsSay('this is main - calling test1(1, 2, 3)...\n'); |
| 13 | test1(1, 2, 3); |
| 14 | |
| 15 | tadsSay('back in main - calling test2(4, 5)...\n'); |
| 16 | test2(4, 5); |
| 17 | |
| 18 | tadsSay('back in main - terminating!\n'); |
| 19 | } |
| 20 | |
| 21 | function test2(a, b) |
| 22 | { |
| 23 | tadsSay('-> this is test2(' + a + ', ' + b + ')\n'); |
| 24 | } |