< Rebol Programming

USAGE:

SOURCE 'word 

DESCRIPTION:

Prints the source code for a word.

SOURCE is a function value.

ARGUMENTS

  • word -- (Type: word)

SOURCE CODE

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]
]
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.