I wonder if the following code is (partially) ANS compatible, and
if it is easy to understand what it does, especially the word MAIN3.
What I need is a word that is passed parameters that define an index
into an array that is not allotted yet. So neither the index nor the
base address
can be pre-computed.
When the word executes (after much more code which
finally sets up the data), it should access the array to fetch a byte at
the indexed position.
I don't think I quite understand what you're trying to achieve.
But what happens if there are errors in the process?
Leftover garbage on the s-stack?
At least in my system(s), INCLUDED is implemented with an
internal CATCH/THROW mechanism, which clears all important
stacks (and some internal stuff) on error.
As for ANS compatibility: who cares, as long as your code
is well documented.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 504 |
Nodes: | 16 (2 / 14) |
Uptime: | 244:54:41 |
Calls: | 9,891 |
Files: | 13,794 |
Messages: | 6,294,410 |