How can I limit the output to the F# Interactive console to my own output?
In my current setup the fsi writes lots of information (on types and content of the data structures) as it runs through the script. I have tried the quiet mode without success.
Thanks!
You can set ShowDeclarationValues, ShowProperties, and ShowIEnumerable to false.
You may still see types, but not content (which is generally the bulk of the output).
#if INTERACTIVE
fsi.ShowDeclarationValues <- false
fsi.ShowProperties <- false
fsi.ShowIEnumerable <- false
#endif
Another unconventional method might be the following:
--quiet
option
printf
use eprintf
for your own output, the effect would be exactly what you asked forin the script
eprintfn "Testing: %n" 123
in FSI window
Testing: 123
Any other, but real error messages output simply will not appear in the FSI window, including all evaluation results; at the same time all conveniences of printf
are still available to you, including familiar formatting.
UPDATE: I posted a further enhancement allowing use of unchanged output code for both normal and "quiet" modes of FSI output.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With