I'll just give you a few more commands to play with :-)
On a typed file, you just use the command FileSize(Type).
It gives you the exact number of records in the file.
:icon_exclaim: just remember that 0 is also a record.
Now for the coding:
VAR
TheStart, TheEnd:INTEGER;
BEGIN
.... ... ..
TheEnd:=FileSize(YourAssignedFileType);
TheStart:=FileSize-14;
DEC(TheStart); // We need to decrease this value by one because we count Zero too.
Seek(YourAssignedFileType,TheStart);// Jumps to the correct location of data.
REPEAT
.... read the data
INC(TheStart);
UNTIL TheStart=TheEnd;
.. ... ....
END;
I am sure you figure the rest out.
If you have less than 14 records, you need to make some code to avoid error there too.
Best regards.
Morten, Norway.