Skip to content
angerangel edited this page Mar 19, 2013 · 1 revision

USAGE

   MAKE-BANNER fmt

DESCRIPTION

Build startup banner.

MAKE-BANNER is a function value.

ARGUMENTS

  • fmt

#SOURCE

make-banner: make function! [  [
    "Build startup banner."
    fmt /local str star spc a b s
][
    if string? fmt [return fmt]
    str: make string! 200
    star: append/dup make string! 74 #"*" 74
    spc: format ["**" 70 "**"] ""
    parse fmt [
        some [
            [
                set a string! (s: format ["**  " 68 "**"] a)
                | '= set a [string! | word! | set-word!] [
                    b:
                    path! (b: get b/1)
                    | word! (b: get b/1)
                    | block! (b: reform b/1)
                    | string! (b: b/1)
                ]
                (s: format ["**    " 11 55 "**"] reduce [a b])
                | '* (s: star)
                | '- (s: spc)
            ]
            (append append str s newline)
        ]
    ]
    str
] ]
Clone this wiki locally