仅显示内容 [英] Display only something
本文介绍了仅显示内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们可以在某些情况下使用display命令吗?
can we have the display command with certain conditions ,
例如,如果我们只想打印东西,则其值大于7.换句话说,我们怎么能拥有
For example, if we want to just print things their value are bigger than 7 . in other word how can we have
Display $( x.val> 7)
一般情况下,显示命令是否有条件?
In general, is it possible to have condition on display command?
推荐答案
是的,您可以在Display语句上使用$条件,就像在任何赋值语句中一样:
Yes, you can use the $ condition on a Display statement like in any, e.g., assignment statement:
Scalar x /2/;
Display$(x>3) 'X is greater than 3';
Display$(x>1) 'X is greater than 1';
这篇关于仅显示内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文