我有这个 REBOL 脚本:
REBOL [Title: "Employee list"]
emp-list: [
"Amy" 1
"Bob" 2
"Carrie" 3
]
gui-layout: [ text "click to reveal number" ]
foreach [name id] emp-list [
append gui-layout [
box name [print id]
]
]
view layout gui-layout
奇怪的是,对我来说,它会创建一个包含三个 Carries 的窗口,单击时会打印 3 个。我在这里做错了什么?