Oh! I didn't quite understand the problem. So I'm silent and learning! :)
A quick lesson in mem.TYPE:
SUB Foo (m as _MEM)
Now, when we pass our memblock to Foo, what is it? Is it a memblock of an integer, a screen, or what?
IF m.TYPE AND 2048 then it's a memblock pointing to a screen image.
IF m.TYPE AND 1 then it's a 256 color screen image.
IF m.TYPE AND 2 then it's a text screen.
IF m.TYPE AND 4 then it's a 32-bit screen.
END IF
IF m.TYPE AND 512 then it's a string which we're pointing to. (set length string as variable length doesn't work with mem)
IF m.TYPE AND 1024 then it's an _UNSIGNED TYPE (we can get the type by using AND 1, 2, 4, or 8 for byte size)
And so on and so on.... With those proper values, we can use m.TYPE to determine exactly what variable type we're pointing at, and then process it accordingly.
But to use those values, the documentation has to be correct on them... and it wasn't, but it is now. :D