跳转到内容

Rebol 编程/源代码

来自维基教科书,开放世界中的开放书籍
SOURCE 'word 

打印单词的源代码。

SOURCE 是一个函数值。

  • word -- (类型: word)

源代码

[编辑 | 编辑源代码]
source: func [
    "Prints the source code for a word." 
    'word [word!]
][
    prin join word ": " 
    if not value? word [print "undefined" exit] 
    either any [native? get word op? get word action? get word] [
        print ["native" mold third get word]
    ] [print mold get word]
]
华夏公益教科书