loading a date!
[1/4] from: hallvard:ystad:oops-as:no at: 21-Jun-2004 21:44
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
]
>> 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?
Hallvard
PS. Excuse me for sending duplicate test messages. I received one of them right now,
with one hour delay. I thought it was gone missing.
[2/4] from: carl:cybercraft at: 22-Jun-2004 9:27
>=== Original Message >
>Hello folks. I think I have some abnormal functionning here. I have three
<<quoted lines omitted: 22>>
>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?
Hmmm - not sure. No need to actually have the dates on disk to see the behaviour...
>> load "10-Dec-97/19:55:17/GMT"
== [10-Dec-1997/19:55:17 /GMT
]
>> load "10/Dec/97/19:55:17/GMT"
== 10-Dec-1997/19:55:17
but you'll notice this works...
>> load "10-Dec-97/19:55:17-GMT"
== 10-Dec-1997/19:55:17
so you could say you're not being consistant by using hyphens and a slash as the seperators
with the format that returns a block. Except for the fact that this works...
>> load "10/Dec/97/19:55:17-GMT"
== 10-Dec-1997/19:55:17
:-)
Wouldn't do any harm to report it to feedback. (Unless others here can argue it's consistant
behaviour.)
- Carl Read
[3/4] 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"
<<quoted lines omitted: 3>>
> == "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
<<quoted lines omitted: 8>>
> 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.
[4/4] from: g::santilli::tiscalinet::it at: 22-Jun-2004 12:49
Hi Hallvard,
On Monday, June 21, 2004, 9:44:11 PM, you wrote:
>>> load b
HY> == 10-Dec-1997/19:55:17
It's indeed quite weird that /GMT is ignored in this case...
Regards,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted