PxPlus User Forum

Main Board => Discussions => Programming => Topic started by: michaelgreer on June 11, 2020, 11:45:36 AM

Title: +B / -B behavior
Post by: michaelgreer on June 11, 2020, 11:45:36 AM
I am attempting to cause a log file to not buffer.  From what I can tell from the docs is that -B should be used in an open, like open(hfn,opt="-B")mylog.txt.

This does not seem to be working.  Am I misinterpreting the documentation?
Title: Re: +B / -B behavior
Post by: Mike King on June 11, 2020, 03:28:28 PM
The '-B' and '+B' are Mnemonics which means you would PRINT them to an OPEN file to turn on/off buffering.

They are effective on serial type files where the system buffers the data internally in order to improve speed as opposed to writing to the file after each PRINT/WRITE directive.