is there an easy command to read from a file all the numbers which are stored in the file.

lets say we have the file arraydata.dat:

Code:
3 929 942.3 -2 0 28 92

//and so on.......
Now, without knowing how many numbers there are in arraydata.dat, is there a way of setting up a while loop until it reads every single number, and store them in an array?

I can do it so that i can say collect 10 numbers from the file, but not get all the numbers from it (that is when i do not know how many there are).