Thanks for your help earlier, I've got this so far: fn getNumbers =( local listArray = #() fileS = openFile "C:\\numbers.txt" mode:"r" while not eof fileS do ( lineInfo = readLine fileS append listArray lineInfo ) close fileS for i in listArray.count do ( print i )) My only problem is that my last for loop doesn't work. If…
Is it possible to populate an array with information from a text file. The info in the text file would just be numbers on different lines. I've no idea how to do this, any help would be appreciated :)
should be or you could do it this way "for x in y do" only works on arrays, your giving it an integer (listarray.count). for large data sets use the second method as its much faster.
yes. look in documentation for "FileStream Values" make a function to do this, quite easy. open the file, read each line, if it is ints you want convert the string to int and bingo. good luck!