< Rebol Programming
USAGE:
CONFIRM question /with choices
DESCRIPTION:
Confirms a user choice.
CONFIRM is a function value.
ARGUMENTS
- question -- Prompt to user (Type: series)
REFINEMENTS
- /with
- choices -- (Type: string block)
SOURCE CODE
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 ]
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.