i need to read the last 14 Entries made into a typed file and then list the entries in a StringGrid so i can copy them to label captions later.
I am a little unsure how to write the Code to loop for the last 14 Entries.
the current code i have is this
if SysUtils.FileExists(ShiftFile) then begin // Reopen the file in read only mode AssignFile(F, ShiftFile); Reset(F); try // Display the file contents while Not Eof(F) do Read(F, shift); // Here i need to find the last 14 Entries finally CloseFile(F); end;
i know that the While Not EoF will just read the entire file until it reaches the end.
How could i make it Read only the last 14 Entries and then list each one in a StringGrid so i can use them later.
thank you for your time.