I need to store a rather big number of variables and I tried to do that by storing each variable as Z[n] with varying n. I guess this was not my best idea. The first problem I encountered is when I tried to check whether Z[n] is set. As you can see at the picture if I do this inside a loop it is always true and outside a loop it is the correct value. Why is this happening? I have mathematica 8.0.4.0.
(I had no idea how should I have tagged the question. Feel free to change them.)

Leonid thank you for the link.
– tst Dec 16 '12 at 23:40z=Table[Unique[],{numVariables}]then you can havex[[1]],z[[2]],...orTable[Unique["z"],{numVariables}]to givez1,z2,z3,.... Though the exact numbering of the latter depends upon the existence of any already definedzs. – image_doctor Dec 16 '12 at 23:46