如何隐藏 $Aborted 消息? [英] How can I hide $Aborted message?

查看:17
本文介绍了如何隐藏 $Aborted 消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我正在中止评估,并且可以在侧面的黑条消失时看到它.所以不需要这个消息.如何关闭?

I know that I'm aborting the evaluation and can see it when the black bar on the side goes away. So there is no need for this message. How do I turn it off?

推荐答案

如果您不将 $Post 用于其他用途,或者如果您可以组合功能,则可以使用:

If you are not using $Post for something else, or if you can combine functions, you could use:

$Post = # /. $Aborted -> Null &;

请注意,您可能会破坏某些东西,因为程序可能会在其控制流中使用 $Aborted.

Be warned that you may break things, as programs may use $Aborted in their control flow.

更有效地解决 Alexey 演示的问题:

More robustly, addressing the problem Alexey demonstrates:

$Post = Function[Null, Unevaluated@# /. $Aborted -> Null, HoldAllComplete];

这篇关于如何隐藏 $Aborted 消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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