From 7f0e6ea654037eda11c2e84946f99bad3f1ab6e4 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Wed, 26 Jul 2023 00:48:43 -0400 Subject: Division fixes --- tnslc/vector_test.tnsl | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'tnslc/vector_test.tnsl') diff --git a/tnslc/vector_test.tnsl b/tnslc/vector_test.tnsl index bfb41cc..ee4a25c 100644 --- a/tnslc/vector_test.tnsl +++ b/tnslc/vector_test.tnsl @@ -14,15 +14,22 @@ Vector vec vec.start(1) - uint8 a = _alert{0} - vec.push(~a) - vec.push(~a) - a = _alert{len _alert - 2} - vec.push(~a) - a = 0 - vec.push(~a) - _printf(vec.get(0)) - _printf(vec.get(0)) + + uint8 buf = 0 + /; loop (int i = 0; i < 20) [i++] + buf = 'A' + i + vec.push(~buf) + ;/ + + buf = 0 + vec.push(~buf) + + _printf(vec.dat) + + /; loop (int i = 0; i < 21) [i++] + vec.pop() + ;/ + vec.clean() return 0 ;/ \ No newline at end of file -- cgit v1.2.3