[fpc-pascal] Where does Write(Ln) actually write to?

leledumbo leledumbo_cool at yahoo.co.id
Tue May 12 05:38:05 CEST 2009



Jonas Maebe-2 wrote:
> 
> It writes to whatever the text file variable called "stdout" in rtl/ 
> inc/systemh.inc is assigned to. Standard I/O is indeed buffered, see  
> the routines in rtl/inc/text.inc. The actual writing from the buffer  
> to the associated file/device is done by FileWriteFunc(), which calls  
> Do_Write() (the latter is an OS-specific function that you have to  
> implement).
> 
> Also note that if textrec.FlushFunc is nil, then write(ln) will not  
> automatically flush after each operation. As you can see in  
> FileOpenFunc(), it is only assigned in case Do_Isdevice() returns true  
> for the handle of the opened "file".
> 

Roger that, implementation begins...
-- 
View this message in context: http://www.nabble.com/Where-does-Write%28Ln%29-actually-write-to--tp23380791p23495593.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.




More information about the fpc-pascal mailing list