Refer to NG for Clipper, or the Clipper manuals. Normally, freadstr() returns NULL when the size of the buffer you send "by reference (@)" to this function, exceeds the remaning bytes of the file. Usuallly the EOF() of a file is CHR(26), but not expect this always will work.
I use to manage this situation with fread() (nearly identical with freadstr() ), and check if in the buffer I read there is a chr(26), or null response, or the size of the response isn't identical that the buffer I've sent to read.
In this case, simply check for the len() of the buffer: if is different against the size of the buffer you sent, you reached the eof().