Rebol 编程/protect-system
外观
< Rebol 编程
PROTECT-SYSTEM
保护所有系统函数和系统对象免于重新定义。
PROTECT-SYSTEM 是一个函数值。
protect-system: func [ {Protects all system functions and the system object from redefinition.} /local vals words word ][ vals: second system/words words: make block! 1 foreach word first system/words [ if any-function? first vals [append words word] vals: next vals ] foreach word bind words 'read [protect word] protect 'system ]