We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider:
var f: File stdout = f
On Ubuntu and OSX, this works fine. In my code, I am backing up stdout and restoring it later.
However, on Windows I see:
error: lvalue required as left operand of assignment stdout = f__diPCTL71W7KGJSC9aB9avGTw;
On the Nim playground, I see:
error: assignment of read-only variable 'stdout' stdout = f_aaZ4Cbdkmq1Yxbybfr175A;
stdout is a var so it should be writable in theory.
The text was updated successfully, but these errors were encountered:
Use system.reopen instead.
system.reopen
Sorry, something went wrong.
I am using reopen for Windows but cannot recover stdout when I want it back later on in my program.
https://github.com/nimterop/nimterop/blob/master/nimterop/toast.nim#L171
Any reason why this shouldn't work consistently across OS?
stdout cannot be reassigned on some systems. glibc is okay with it but it fails on Windows and musl based systems. This isn't a Nim issue.
https://stackoverflow.com/questions/1908687/how-to-redirect-the-output-back-to-the-screen-after-freopenout-txt-a-stdo
No branches or pull requests
Consider:
On Ubuntu and OSX, this works fine. In my code, I am backing up stdout and restoring it later.
However, on Windows I see:
On the Nim playground, I see:
stdout is a var so it should be writable in theory.
The text was updated successfully, but these errors were encountered: