Rebol 编程/do-boot
外观
< Rebol 编程
DO-BOOT target args dependent
仅当值及其文件(URL)及其依赖项存在时才执行值。
DO-BOOT 是一个函数值。
- 目标 -- (类型:任何)
- 参数 -- (类型:任何)
- 依赖项 -- (类型:任何)
do-boot: func [ {Does a value only if it and its file (URL) and it's dependent exists.} target args dependent /local check dir ][ check: func [target /local tmp] [ if exists? target [return make file! 1] if exists? system/options/home/:target [return system/options/home] none ] if target [ if dependent [dir: check dependent] if none? dir [dir: check target] if dir [ dir: append copy dir target if exists? dir [do/args dir args return true] ] ] false ]