[REBOL] Re: Version incompatibilities
From: volker:nitsch:gmai:l at: 16-Dec-2005 15:57
On 12/16/05, SunandaDH-aol.com <SunandaDH-aol.com> 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 the
> parse dialect -- as you've just spotted
>
> 2. No version of REBOL can load a header for a script that has a 'needs entry
> 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 thread).
>
> 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 like
> 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