diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2023-07-07 15:50:30 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2023-07-07 15:50:30 -0400 |
commit | ceaeb8df4d9bf9b518239ea623d813add5a71072 (patch) | |
tree | 7061a06dc67b2832248a36d842b051a408a5a5cd /tnslc/simple.tnsl | |
parent | 34066553843ee869d71f24646eea1bac319225d6 (diff) |
Returns inside of complex operations
Diffstat (limited to 'tnslc/simple.tnsl')
-rw-r--r-- | tnslc/simple.tnsl | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/tnslc/simple.tnsl b/tnslc/simple.tnsl index 1c54577..1541df2 100644 --- a/tnslc/simple.tnsl +++ b/tnslc/simple.tnsl @@ -1,19 +1,7 @@ +:include "c_wrap.tnsl" +:include "logging.tnsl" -{}uint8 str1 = "abcd" - -struct Stress { - int i, j, k -} - -struct Test { - ~Stress s -} - -/; s_call (Test t) - t.s`.i = 1 - t.s`.j = 1 + t.s`.i - t.s`.k = t.s`.j + 1 -;/ +{}uint8 eee = "eee\0" /; main (int argc, ~~uint argv) [int] # On windows, the first two arguments are passed in RCX and RDX, so we need to @@ -21,14 +9,10 @@ struct Test { asm "mov r8, rcx" asm "mov r9, rdx" - Stress test - Test stress - - stress.s = ~test - - s_call(stress) - - # return 3 - return stress.s`.k + log_err(~eee{0}) + log_info(~eee{0}) + log_debug(~eee{0}) + + return 0 ;/ |