受保护的执行,2个案例

问题描述

为什么在第一种情况下保护执行有效,但在第二种情况下不起作用?:

q)t:([]a:1 2;b:3 4);
q)@[@[cols t; ; :; `bb]; (cols t)?`b; `columnNotFound]
`a`bb
q)@[@[cols t; ; :; `cc]; (cols t)?`c; `columnNotFound] // 1. works perfectly
`columnNotFound
q)@[@[cols t; (cols t)?`c; :; `cc]; `; `columnNotFound] // 2. exception does not handled
'length
  [0]  @[@[cols t; (cols t)?`c; :; `cc]; `; `columnNotFound]
         ^

更新:

嗯,我在尝试后怀疑:

q)@[{@[cols t; (cols t)?`c; :; `cc]}; `; `columnNotFound]
`columnNotFound

解决方法

受保护的执行正在使用您提供的参数。前两个示例是投影,但最后一个不是,因此执行失败。

new WebDriverWait(driver,TimeSpan.FromSeconds(20)).Until(ExpectedConditions.ElementToBeClickable(By.XPath("//h5[text()='Brandes Intl Equity']//following::*[name()='svg' and @data-icon='pen'][@role='img']/*[name()='path']"))).Click();

在您的 upd 中,使 q){@[cols t;x;:;`bb]}(cols t)?`b `a`bb q){@[cols t;x;:;`cc]}(cols t)?`c / thrown into error trap 'length [1] {@[cols t;x;:;`cc]} ^ q))\ q)@[cols t;(cols t)?`c;:;`cc] / fails on execution 'length [0] @[cols t;(cols t)?`c;:;`cc] ^ q) 应用函数会强制使用受保护执行中的参数。

@

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...