Rebol 编程/save-user
外观
< Rebol 编程
SAVE-USER
保存 user.r,并提示是否覆盖。
SAVE-USER 是一个函数值。
save-user: func [ "Save user.r, prompting for overwrite permission" /local user.r ][ user.r: either view? [view-root/user.r] [system/options/home/user.r] if any [ not exists? user.r confirm "^/Overwrite the current user.r file? " ] [ print { Creating user.r file in the REBOL home directory. } write-user print trim { ^-^-^-To change these settings, type "set-user" at the ^-^-^-prompt or edit your user.r file. ^-^-} ] ]