Quantcast
Channel: How to redirect output to file if no console detected in Nim - Stack Overflow
Viewing all articles
Browse latest Browse all 4

Answer by Raymond Imber for How to redirect output to file if no console detected in Nim

$
0
0

Edit:@tjohnson this is in response to your comment. I don't have enough points to respond to your comment directly or something? Thanks Stack Overflow...

It's hard to say without seeing more of the code.

What version of Nim are you using?

I suspect stdout has been shadowed by a read only symbol.

Are you calling this code inside of a proc and passing stdout as an argument?like this:proc foo(stdout: File)

If so, you will need to change it to a var parameter to make the argument writable:proc test(stdout: var File)

Or use stdout as a global variable instead.


Viewing all articles
Browse latest Browse all 4

Trending Articles