Thanks for the post Quad but my question is why my code doesn't work.

vector() uses a pool of 64 temporaries so it isn't always appropriate and I want a function which can dump local, global or temporaries.