完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我正在VEE中编写一些函数来判断一个语句是否是动态的。
例如,我有一个字符串,表示“3> 2”或“4谢谢! 以上来自于谷歌翻译 以下为原文 I am writing some function in VEE to judge if a statement is true or not dynamically. For example, I have a string that says "3>2" or "4<100", and I need to know if that statement of the string is true or not. I tried the build-in IF/Else/Then flow but failed to find any control input. How can I evaluate the string to see if it is true or not? Thanks! |
|
相关推荐
2个回答
|
|
我不清楚你要做什么,但我会猜测;
您希望直观地了解数据是否符合if / then / else语句中设置的任何条件? 如果是,只需将true语句(“Then”)输出连接到指示符或文本到显示,将false(Else)引脚连接到不同的指示符或文本。 我做了一个快速的例子来强调这一点; 只需更改real64值即可观察指示器是否为真或假。可能使其更复杂的一件事是数据类型; 你把它称为“字符串”,但使用数字作为例子。 如果它是真正的数字(3 以上来自于谷歌翻译 以下为原文 I am not quite clear on what you are trying to do, but I will take a guess; You want to visually know if data meets any of the criteria set in your if/then/else statement? If yes, just wire the true statement (“Then”) output to an indicator or text-to-display and the false (Else) pin to a different indicator or text. I did a quick example to highlight this; just change the real64 value to watch the indicator tell you if it is true or false. One thing that could make it more complicated is the data type; you were calling it “Strings” but using numbers as examples. If it is truly numbers (3<2 or 4<100), then it is easy, and that is what I used in my example, but if it is strings (“Jane”<”Two”) then it would be more complicated. 附件
|
|
|
|
如果它只是4Load一个文本输入框,那么一个标准+公式框。从公式框中删除终端和公式。将一个控制终端添加到公式框(只允许一个公式)的线文本输出,并且
非常重要..... wire将文本输出到flow中的公式。将结果发送到字母数字,您应该看到true或false,具体取决于文本框中的评估。 以上来自于谷歌翻译 以下为原文 If it's as simple as 4<10 maybe you want this...?? Load a text input box, then a standard + formula box. Delete the terminals from the formula box, and the formula. Add a control terminal to the formula box ( only one allowed is formula ) wire text output, and VERY IMPORTANT..... wire Text out flow to formula in flow. Send result to alpha numeric ,and you should see true, or false, depending on the evaluation in the text box. |
|
|
|
只有小组成员才能发言,加入小组>>
1291 浏览 0 评论
2375 浏览 1 评论
2194 浏览 1 评论
2065 浏览 5 评论
2952 浏览 3 评论
1119浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
756浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
931浏览 0评论
1293浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-25 20:10 , Processed in 1.406700 second(s), Total 80, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号