检查输入字符串中的晶片是否包含在数据表中我有一个来自下面的输入字符串:
For( i = 1, i <= N Rows( dtWaferIDList ), i++,
tempi = Column( dtWaferIDList, 1 )[i];
InputString = If( i == 1, "'", "" ) || InputString || tempi || If( i < N Rows( dtWaferIDList ), "','", "'" );
);
还有我从数据库中提取的 table1。 我想检查一下(在表 1 的晶圆列中)输入字符串中的所有晶圆是否都包含在该列中。
-如果所有晶圆都有数据:显示消息=“所有可用晶圆的数据”。
- 如果不是:显示消息 =“无可用数据”。
谢谢!
数据表脚本回复:检查输入字符串中的晶片是否包含在数据表中谢谢你俩! 看起来现在正在工作。 我很感激!
回复:检查输入字符串中的晶片是否包含在数据表中您指定的 msg 值不正确。下面将工作
msg = "\!N#Data is unavailable for the following wafers:" || Char( uncommon2 << Get Keys );
回复:检查输入字符串中的晶片是否包含在数据表中使用调试 Show()s 和小数据集来测试你哪里出错了(从查看/日志打开日志窗口)。
也许这会帮助你转发:
Names Default To Here(1);
dt1 = Open("$SAMPLE_DATA/Big Class.jmp");
dt1 << Select Rows([1,2,3]);
dt2 = dt1 << Subset(selected rows);
dt1 << clear select;
dt1_uniq = Associative Array(dt1:name);
dt2_uniq = Associative Array(dt2:name);
dt1_copy = dt1_uniq;
dt2_copy = dt2_uniq;
dt1_copy << Remove(dt2_copy);
Show(concat items(dt1_uniq << get keys, ", "));
Show(concat items(dt2_uniq << get keys, ", "));
Show(concat items(dt1_copy << get keys, ", "));
Show(N Items(dt1_uniq), N Items(dt2_uniq), N Items(dt1_copy));回复:检查输入字符串中的晶片是否包含在数据表中@jthi
我看不出这如何解决我的特定问题。 当我运行你的脚本时,没有任何反应。 我需要关联数组中的键对用户可见并显示在消息框中。
unique wafers = Associative Array( WaferRgDt:Wafer );
given wafers = Associative Array( dtWaferIDList:WaferList );
intersection = unique wafers; intersection << Intersect( given wafers); //intersection between arrays
//uncommon represents wafers that have no data associated with it.
uncommon = given wafers; uncommon2 <<REMOVE></REMOVE>
回复:检查输入字符串中的晶片是否包含在数据表中要将字符串列表转换为字符串,您可以使用 Concat Items()
Names Default To Here(1);
aa = Associative Array({"bun",
"shoe",
"tree",
"door"}
);
uniqKeys = aa << get keys;
Show(uniqKeys);
Show(Concat Items(uniqKeys, ", "));
回复:检查输入字符串中的晶片是否包含在数据表中还使用了这个讨论帖子来帮助编写上面的代码回复:比较两个列表(不常见元素)的快速方法?
回复:检查输入字符串中的晶片是否包含在数据表中你好尼尔森,
感谢您的帮助! 我对 JMP 还是有点陌生,根本没有使用过关联数组。 我已经在脚本指南和索引中阅读了它;但我仍然有些困惑。 这是我在代码中的位置:(直接从数据库打开表 WaferRgDt 之后)
unique wafers = Associative Array( WaferRgDt:Wafer );
given wafers = Associative Array( dtWaferIDList:WaferList );
intersection = unique wafers; intersection << Intersect( given wafers); //intersection between arrays
//uncommmon2 represents wafers that have no data associated with it.
uncommon2 = given wafers; uncommon2 <<REMOVE></REMOVE>
当我运行它时,我得到一个带有句号的空消息框......所以似乎仍然有问题。 想知道这是逻辑问题还是语法问题。 如果可能的话,我在寻找如何在消息框中写入密钥时遇到了一些麻烦。 希望这已经足够清楚了。 再次感谢!
回复:检查输入字符串中的晶片是否包含在数据表中@jthi为您指出了正确的方向。您建议的方法是使用非常长的文字字符串。我建议您要么使用关联数组,要么使用 JMP 列表。
下面是一个简单的脚本,用于打开包含晶圆的数据表。然后它会创建一个包含一组随机晶圆的数据表。最后,它检查随机集是否包含第一个数据表中的所有晶圆。
names default to here(1);
// Open Data Table: semiconductor capability.jmp
// → Data Table( "semiconductor capability" )
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
unique wafers = associative array(dt:Wafer);
// Create a random wafer table and see if it contains all wafers
dtRand = new table("Random",
add rows(60),
new column("Rand Wafer", set each value(random integer(1,24)));
);
random wafers = associative array(dtRand:Rand wafer);
Random wafers << Intersect( unique wafers );
if(n items(Random wafers) == n items( unique wafers),
msg = "data for all wafers available",
msg = "no data available"
);
new window("Message", <<MODAL></MODAL>回复:检查输入字符串中的晶片是否包含在数据表中您很可能会使用关联数组进行此比较关联数组的应用. 检查部分比较两个不同数据表中的列