Force write to write to console

H. S. Teoh hsteoh at qfbox.info
Sat Dec 6 23:51:04 UTC 2025


On Sat, Dec 06, 2025 at 11:07:30PM +0000, Alexandru Ermicioi via Digitalmars-d-learn wrote:
> On Saturday, 6 December 2025 at 21:25:27 UTC, Brother Bill wrote:
> > ```
> > write("foo"); // writes to the console, but it doesn't display yet.
> > writeln;      // Now it displays, with a new line.
> > ```
> > 
> > How to force writing to the console after ```write("foo");```
> > 
> > I am doing this for a tutorial video, and want the
> > ```write("foo");``` to immediately write to the console.
> 
> make sure you flush stdout buffer

I.e.:

```
	write("something");
	stdout.flush;
```


T

-- 
MICROSOFT = Most Intelligent Customers Realize Our Software Only Fools Teenagers


More information about the Digitalmars-d-learn mailing list