DIM SAV[5] means that you're creating a list of values (a.k.a. an array) called SAV with 5 values stored in it. However, items in an array are numbered starting from 0, not 1. What this means is, DIM SAV[5] has five items in it: SAV[0], SAV[1], SAV[2], SAV[3], and SAV[4]. Notice that the last item is SAV[4], not SAV[5], so printing SAV[5] is an error.