[REBOL] Re: loading a date!
From: nitsch-lists:netcologne at: 22-Jun-2004 3:52
On Montag, 21. Juni 2004 21:44, Hallvard Ystad wrote:
> Hello folks. I think I have some abnormal functionning here. I have three
words, 'a, 'b and 'c:
> >> a: "10-Dec-97/19:55:17/GMT"
>
> == "10-Dec-97/19:55:17/GMT"
>
> >> b: "10/Dec/97/19:55:17/GMT"
>
> == "10/Dec/97/19:55:17/GMT"
>
> >> c: "10-Dec-97/19:55:17"
>
> == "10-Dec-97/19:55:17"
>
> They are indeed very similar, but 'b has slashes where 'a and 'c have
dashes. 'A is append c "/GTM". But look what happens when I load these three:
> >> load a
>
> == [10-Dec-1997/19:55:17 /GMT
> ]
similar to this:
!>> load "/a/b/c"
== [/a /b /c
]
or
>> load "0x0/a"
== [0x0 /a
]
Reasons:
1) A refinement following some types needs no space before it.
This is often a surprise. So for rebol 10-Dec-1997/19:55:17/GMT is actually
two values, and 0x0/a is to. While b/a or http://a or %a/b are single values.
I don't know if this is a bug.
2) When load can load only one value, it returns the value. When it can load
multiple values, it returns all values in a block.
> >> load b
>
> == 10-Dec-1997/19:55:17
>
> >> load c
>
> == 10-Dec-1997/19:55:17
>
> >> type? load a
>
> == block!
>
> >> type? load b
>
> == date!
>
> >> type? load c
>
> == date!
>
> It behaves like this on /View 1.2.46.3.1, /Core 2.5.6.2.4 and /Core
> 2.5.6.3.1. Do you all agree that this is a bit weird?
>
Yes.