I want to load the Song_Data_Array with the data that I have loaded from my playlist file. It's a text file. Each line is the location of the song and the song artist - title.mp3. The number of array entries will vary. I want to use a loop to fill the array. But how do I terminate the loop if the number of items is variable?
Can you set a variable to the string length, and then reduce that by the length of each array entry until it reaches zero?
Good suggestion. I'll give it a try.
I ended up indexing on '.mp3' ... indexof(string, '.mp3')... which worked well and yields a -1 at the end of the file. So I just terminated when -1 was returned from the indexof.
2 Likes