Last modified on 13 November 2012, at 10:47

REBOL Programming/title-of

USAGE:Edit

TITLE-OF value 

DESCRIPTION:Edit

Returns a copy of the title of a function.

TITLE-OF is a function value.

ARGUMENTSEdit

  • value -- (Type: any)

SOURCE CODEEdit

title-of: func [
    "Returns a copy of the title of a function." 
    value
][
    case [
        object? :value [cause-error 'script 'invalid-arg 'title] 
        any-function? :value [if string? value: pick third :value 1 [copy value]] 
        'else [cause-error 'script 'cannot-use reduce ['reflect type? :value]]
    ]
]