The Flush function The Flush function is called at the end of each Read, Readln, Write, and Writeln. It can optionally flush the text file
buffer.
If Mode is fmInput, the Flush function can store zero in BufPos and BufEnd to flush the remaining (unread) characters
in the buffer. This feature is seldom used.
If Mode is fmOutput, the Flush function can write the contents of the buffer exactly like the InOut function, which
ensures that text written to the device appears on the device immediately. If Flush does nothing, the text doesn't
appear on the device until the buffer becomes full or the file is closed.