I am using Turbo Pascal 5.5 and have the following code as part of a program
However, the file is also used by another program running concurrently and often I get "Runtime error 5: file access denied." Is there a way for me to check if the assign or reset statement failed and try again until it succeeds (similar to fstream.good() in c++ )? In case it helps, the goal is to have two programs communicate with each other through an intermediate file. Thank you.