If you want to read data until you reach the end of a file,
then instantiate a while reading pattern:
while (input expression)
embedded statement
If you want to read data until you reach the end of a file,
and you want to keep track of how many data you read,
then instantiate a for reading pattern:
for (initialization expression;
input expression;
reassignment expression)
embedded statement