Re: stdout.flush

2016-05-25 Thread Steven Schveighoffer via Digitalmars-d-learn
solved by doing stdout.flush; (compiles, but I'm still writing the code) but as write, writef, etc. don't require explicitly mentioning stdout, I think that the documentation for flush should mention that the file must be specified. Currently it seems to imply that all files will be flushed. write

stdout.flush

2016-05-25 Thread Charles Hixson via Digitalmars-d-learn
Using: dmd --version DMD64 D Compiler v2.071.0 on debian Linux, and importing: importstd.stdio; the line: flush(); causes: nt.d(29): Error: undefined identifier 'flush', did you mean function 'fflush'? This appears solved by doing stdout.flush; (compiles, but I'm still writing

Re: Is stdout.flush() unsafe?

2015-12-29 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/29/15 4:57 AM, tsbockman wrote: Trying to compile this: void main() @safe { import std.stdio; stdout.flush(); } Fails with this message: Error: safe function 'main' cannot access __gshared data 'stdout' Is this necessary? If so, what are the synchronization requirements

Is stdout.flush() unsafe?

2015-12-29 Thread tsbockman via Digitalmars-d-learn
Trying to compile this: void main() @safe { import std.stdio; stdout.flush(); } Fails with this message: Error: safe function 'main' cannot access __gshared data 'stdout' Is this necessary? If so, what are the synchronization requirements for access to `stdout`?