我正在尝试设置一个条件来评估几个文本列表的值。这工作,使用开关:
options: ["" "" "" ""]
view layout [
text-list "one" "two" "three" "four" [poke options 1 value]
button "test" [switch/default options/1 [
"one" [alert "first"]
"two" [alert "second"]
"three" [alert "third"]
"four" [alert "fourth"]
] [alert "pick a number!"]
]
]
但是由于某种原因,这个不起作用:
options: ["" "" "" ""]
view layout [
text-list "one" "two" "three" "four" [poke options 1 value]
button "test" [
either options/1 <> 0 [
alert "you have picked a number!"
][alert "pick a number!"]
]
]
如果我将其作为条件,则 EITHER 评估始终执行第一个块,如果我将options/1 <> 0
其作为条件,则始终执行第二个块options/1 = 0
,这显然不是它应该如何工作的。
这是怎么回事?