cfad47cfa3/t3compiler/tads3/test/data/cube.t
| 4b825dc642cb6eb9a060e54bf8d69288fbee4904 | cfad47cfa334b206c65f22086bcc5d63e6f70944 | ||
|---|---|---|---|
1 | #include "tads.h" | ||
2 | |||
3 | main(args) | ||
4 | { | ||
5 | local c1 = cube(1), c2 = cube(2), c3 = cube(3); | ||
6 | local cc3 = cube(c3); | ||
7 | |||
8 | "1 cubed = <<c1>>, 2 cubed = <<c2>>, 3 cubed = <<c3>>\n"; | ||
9 | "3 cubed cubed <<cc3>>\n"; | ||
10 | } | ||
11 | |||
12 | cube(n) | ||
13 | { | ||
14 | return n * n * n; | ||
15 | } |
Download diff