REBOL Programming/source

USAGE:Edit

SOURCE 'word 

DESCRIPTION:Edit

Prints the source code for a word.

SOURCE is a function value.

ARGUMENTSEdit

  • word -- (Type: word)

SOURCE CODEEdit

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]
]
Last modified on 13 November 2012, at 10:49