Rebol 编程/确认
外观
< Rebol 编程
CONFIRM question /with choices
确认用户选择。
CONFIRM 是一个函数值。
- 问题 -- 提示用户(类型:系列)
- /with
- 选项 --(类型:字符串块)
confirm: func [
"Confirms a user choice."
question [series!] "Prompt to user"
/with choices [string! block!]
/local yes no
][
question: form question
if with [
yes: "Yes"
no: "No"
if string? choices [yes: choices]
if all [block? choices not empty? choices] [
either tail? next choices [yes: choices/1] [set [yes no] choices]
]
question: reduce [question yes no]
]
request/confirm question
]