OK. Now this question isn't urgent as I've found another way of solving the problem (using arrays). Still being curious though, how can this be done?