[comp.lang.modula2] HELP!...how to read file of Integers into array without excess 0's

v087mxgb@ubvmsa.cc.buffalo.edu (Shawn E Thompson) (05/04/91)

Hi,

I have an array (say [0..50] ), and I want to read
a file of integers (the quantity of which is UNKOWN).

Right now it works ok, but the rest of the array fills with
zeroes, because I am using a test of DONE, which is always
true for INTEGERS.



REPEAT
    ReadInt(array[i]);
    INC(i);
UNTIL (NOT Done);


it reads all the numbers, then fills the rest of the array
because the rest of the file is blanks (it thinks are 0's)



any graceful way around this ???



TIA

ST