[fpc-pascal] Where is the 'write' function defined and how is it different from 'writeln'?

Sven Barth pascaldragon at googlemail.com
Sun Mar 22 00:44:58 CET 2015


On 22.03.2015 00:11, vfclists . wrote:
> Is the Text object the Write is using global for the whole program or
> thread, ie all Writes will go to that Text object until it is reverted
> back to the default?

The variables Output, Input and StdErr are thread local so you need to 
set them up for each thread.

> In case of wanting to use different Text objects is it possible to
> prefix the Write command with the Text e.g Write(TextObject,
> 'outputtext')? Do Write and WriteLn support something like that?

As I already wrote Write('outputtext') is essentially the same as 
Write(Output, 'outputtext') so you can of course write 
Write(SomeOtherFile, 'outputtext')

Regards,
Sven



More information about the fpc-pascal mailing list