Skip to content
angerangel edited this page Dec 18, 2012 · 1 revision

Table of Contents

USAGE

  ?? 'name

DESCRIPTION

Debug print a word, path, or block of such, followed by its molded value. ?? is a function value.

ARGUMENTS

  • name -- Word, path, and block to obtain values.

SOURCE

??: make function! [  [
    {Debug print a word, path, or block of such, followed by its molded value.}
    'name "Word, path, and block to obtain values."
    /local out
][
    case [
        any [
            word? :name
            path? :name
        ] [
            print ajoin [name ": " mold name: get :name]
        ]
        block? :name [
            out: make string! 50
            foreach word name [
                either any [
                    word? :word
                    path? :word
                ] [
                    repend out [word ": " mold get word "  "]
                ] [
                    repend out [mold word " "]
                ]
            ]
            print out
        ]
        true [probe :name]
    ]
    :name
] ] 
Clone this wiki locally