Calling write doesn't automatically flush the output to the screen. Is there a function I could call to do it manually? writeln doesn't suffer from this problem.