I am using Mathematica 11.2 windows version I found that
generated a blank txt file. However,
Export["test.dat",111] is right. But the doc says
Export["file.txt",expr] exports any expression to a text file.
Is it a bug?
PS. I just tried 11.2 linux version.
Export["test.txt",111] has no such problem.
generally, "Text" option is corrupted on my Mathematica, for example
Export["test.dat", 111, "Text"]
also output blank file. But I have to use
Export["test.dat", ..., "Text", DOSTextFormat -> False], Does anyone encountered the same problem? However to solve it?
Several hours passed, I finally figure it out, and the result is quite peculiar, and seems like a bug.
Things goes like this.
If you add
into your Mathematica's init file, then quit kernel, and run
Export[file,content,"Text"], you will find the file is blank.
But If you just run
Needs["CCompilerDriver`GenericCCompiler`"] in your notebook, it doesn't affect
Quite odd! Wait someone to confirm.
Needs["CCodeGenerator`"] has the same problem if you put it in your init file.