On 12/16/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi Gabriele,
>
> > Just  a  wild guess, but could it be BREAK inside the parse rules?
>
> Thanks.  That looks highly likely.
>
> Seems we have two problems:
>
> 1. color-code.r only works for versions of REBOL that include 'break in t=
he
> parse dialect -- as you've just spotted
>
> 2. No version of REBOL can load a header for a script that has a 'needs e=
ntry
> for a later version:
>
> load/header {rebol [needs: 99.99.99]}  ;; fails with all versions I know =
of.
>

[rebol[]

split-script: func [string /local left hdr right] [
    ; first "[" must be the headers one.
    ; maybe needs more checks?
    left: find string "["
    set [hdr right] load/next left
    left: copy/part string left
    reduce [left hdr right]
]

join-script: func [parts] [
    rejoin [parts/1 mold parts/2 parts/3]
]

if not system/script/args [;demo
    probe s: split-script probe mold/only [
        rebol [
            title: "my-title"
            comment: ".."
        ]
        print "Hello world"
    ]
    s/2: union/skip s/2 [
        Title: "No title"
        Lib-header: [.. default ..]
    ] 2
    probe join-script s
]
]
> The parse problem blinded me to the load problem -- hence my inaccurate
> statement about load/header not being a problem (see earlier in this thre=
ad).
>
> There is an old RAMBO report outstanding about load/header (3968) but it
> doesn't cover this case, so I've just added a new one.
>
> We've applied a bit of lateral thinking to the problem -- it now looks li=
ke
> everything works at REBOL.org despite the obstacles.
> --
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.
>
>


--
-Volker

"Any problem in computer science can be solved with another layer of
indirection. But that usually will create another problem." David
Wheeler
-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to