[REBOL] Re: strange load behaviour
From: nitsch-lists:netcologne at: 26-May-2002 22:28
Am Sonntag, 26. Mai 2002 21:13 schrieb Christian Langreiter:
> I have a text file containing:
>
> {
> rebol [] 2^-
> } {duh}
>
> Upon 'load-ing I expect it to result in a block of two strings. Instead,
> the "rebol []" seems to make REBOL load the first string too,
> resulting in an ...
>
> ** Syntax Error: Invalid date -- 2^-
> ** Near: (line 2) {
>
thats a feature.
that way you can do
#!/somewhere/bin/rebol
rebol[]
=2E..
all upto the rebol[] is ignored.
so is your "{" in this case.
use load/all.
>> load/all "zz^/rebol[] yy"
== [zz
rebol [] yy
]
>> load "zz^/rebol[] yy"
== yy
> Curiously, this happens only if the "rebol []" substring appears as
> first non-withespace element after a line break.
>
> -- case 2 OK --
>
> {rebol [] 2^-
> } {duh}
>
> -- case 3 FAILS --
>
> {
> duh duh
> rebol [] 2^-
> } {duh}
>
> -- case 4 OK --
>
> {
> duh rebol [] 2^-
> } {duh}
>
> -- case 5 FAILS --
>
> {
> rebol [] 2^-
> } {duh}
>
> I'm currently working with large email archives and that proves to be
> quite demanding input data ;-)
>
> -- Chris
- Volker