F#-使F#保持交互式,以免发布输出 [英] F# - Keep F# interactive from posting output

查看:56
本文介绍了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天全站免登陆