I’m working on some legacy code in which there are a lot of WriteLn(F, ‘…’) commands scattered pretty much all over the place. There is some useful information in these commands (what information variables contain, etc), so I’d prefer not to delete it or comment it out, but I want to stop the program from writing the file.
Is there any way that I can assign the F variable so that anything written to it is ignored? We use the console output, so that’s not an option.
Going back a long long time to the good old days of DOS – If you assign ‘f’ to the device ‘nul’, then there should be no output.
I don’t know whether this still works in Windows.
Edit:
You could also assign ‘f’ to a file – assignfile (f, ‘c:\1.txt’) – for example.