I know Paul's kind of busy these days, so I thought I'd go ahead and bring Muelver's Incredible String Theory Hash over to EBasic. See http://ebasic.wikispaces.com/jlm+ibHash+demo (http://ebasic.wikispaces.com/jlm+ibHash+demo)
Note that the pointer-based use of the heap is warned against in the EBasic Help file, but seems to work anyway. Hmmm.... Do I need to put in some heap cleanup code?
Could be. If I use AllocHeap, it's only fair to use FreeHeap to clean up. But where does it go? The subs have to return a pointer to the heap, so it can't be in the sub. Maybe subs clean up after themselves, ya think, maybe? ???
Once you return a heap pointer it is then handled automatically by the parser, which adds code to free the heap at the appropriate point in the code.
Perfect! Just as I suspected -- EBasic cleans up the messes we amateur programmers create. I'm on a roll, here! ::)