diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2023-05-14 01:43:58 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2023-05-14 01:43:58 -0400 |
commit | d850bd17e2533179bfbc2dd6cd8d0c11a43786ba (patch) | |
tree | 15dd425c4c6013983f45df5b0a9fff20afe5a7b9 /tnslc/proper_calling.tnsl | |
parent | ed25b8e9740307c5de2d3e14b1ff6f85391b7953 (diff) |
Windows C wrapping
Diffstat (limited to 'tnslc/proper_calling.tnsl')
-rw-r--r-- | tnslc/proper_calling.tnsl | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tnslc/proper_calling.tnsl b/tnslc/proper_calling.tnsl new file mode 100644 index 0000000..6fd5e69 --- /dev/null +++ b/tnslc/proper_calling.tnsl @@ -0,0 +1,21 @@ +struct CallMe { + int a, b +} + +/; method CallMe + /; call_two (int a, b) [int] + return a + b + self.a + self.b + ;/ + + /; call_four (int a, b, c, d) [int] + return self.call_two(a + b, b * c + d) + self.call_two(a * b + c, c + d) + ;/ + +;/ + +/; main [int] + CallMe cm + cm.a = 0 + cm.b = 0 + return cm.call_four(0, 2, 2, 0) +;/
\ No newline at end of file |