F# - 保持 F# 交互,防止发布输出 [英] F# - Keep F# interactive from posting output

查看:19
本文介绍了F# - 保持 F# 交互,防止发布输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 F# 交互式,我正在计算一些大型列表和数组,但我不想让交互式窗口发布所有这些信息.有没有办法抑制输出?

I'm working with F# interactive and I'm computing some large lists and arrays and I'd rather not have the interactive window post all of that information. Is there way to suppress output?

具体来说,我正在开发单线程和多线程算法,并评估在什么时候从单线程函数更改为多线程函数会变得更有效率.我想让 F# Interactive 报告函数的运行时间,我一直在使用 #time,但我不想在将大数据矩阵打印到屏幕时向上滚动.如果有一种方法可以在保持交互式环境不写出矩阵的同时获取计时数据,我将非常感激.

Specifically I'm developing single threaded and multithreaded algorithms and evaluating at what point does it become more efficient to change from a single threaded function to a multithreaded one. I'd like to have F# Interactive report the run time for the functions, I've been using #time, but I don't want to have to scroll way back up when it prints the large matrix of data to the screen. If there is a way to just get the timing data while keeping the interactive environment from writing out the matrix I would be very appreciative.

推荐答案

我最终使用了

fsi.ShowDeclarationValues <- false

这使它无法输出所有数据.谢谢你的提示.

Which kept it from outputting all of the data. Thank you for the tips though.

这篇关于F# - 保持 F# 交互,防止发布输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆