Your variable, T, is a number. TIMES$ is a string. Changing T to T$ will make your variable into a string and solve the problem. (You should also do the same to the line below it.)