Make banner

angerangel edited this page Jan 4, 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
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.