Also, seeing as you know the number-range, you could put the last number
WELL outside the possible range, to act as an end-of-numbers marker.

eg (untested again)
Code:
#define EOF -999999          //end-of-file value
var var_to_read = 0;
var var_counter = 0;
var handle_of_file = file_open_read("FILE.txt");
...
while(1)
{
   var_to_read = file_var_read(handle_of_file);
   if(var_to_read == EOF )  {   break;   }
   var_counter++;
}




"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial