diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2024-03-25 22:16:48 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2024-03-25 22:16:48 -0400 |
commit | 89a27e4159b2b01be96b5f8ca51832766e878c51 (patch) | |
tree | 6fdef2ee921598dfc44f1cf6e72ab555f0e20876 /tnslc/iterator.tnsl | |
parent | 12679f9be4bd3a924ca0859a7ad133178513bace (diff) |
len fix for variables
Diffstat (limited to 'tnslc/iterator.tnsl')
-rw-r--r-- | tnslc/iterator.tnsl | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/tnslc/iterator.tnsl b/tnslc/iterator.tnsl deleted file mode 100644 index 19dda8c..0000000 --- a/tnslc/iterator.tnsl +++ /dev/null @@ -1,39 +0,0 @@ -struct Iterator { - ~void data, - int size, - current, - _elsz -} - -/; method Iterator - - /; init (~void data, int count, int elsz) - self.data = data - self.size = size - self._elsz = elsz - self.current = 0 - ;/ - - /; next (int count) - self.current = self.current + count - /; if (self.current >= self.size) - self.current = self.size - ;/ - ;/ - - /; prev (int count) - self.current = self.current - count - /; if (self.current < 0) - self.current = 0 - ;/ - ;/ - - /; get [~void] - return self.data + current * _elsz - ;/ - - /; end [bool] - return self.current >= self.size - ;/ - -;/ |