----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: REBOL User List <[EMAIL PROTECTED]>
Sent: Monday, November 15, 1999 6:42 PM
Subject: [REBOL] Bug - Accessing blocks with decimal numbers fails
> Kat wrote:
> > Cool, this works too:
> >
> > block: [
> > thing1 thing2 thing3 thing4
> > A thing1 B thing2 C thing3 D thing4
> > A.2 thing1sub B.2 thing2sub C.2 thing3sub D.2 thing4sub
> > ]
>
> So I tried decimal point numbers:
>
> >> block: [1.1 "One dot one" 1.2 "One dot two" 1.3 "One dot three"]
> == [1.1 "One dot one" 1.2 "One dot two" 1.3 "One dot three"]
> >> block/1.3
> == 1.1
> >> block/2.6
> == "One dot one"
> >> type? 2.6
> == decimal!
>
> Looks like REBOL converts the decimal number into an integer, and then
> uses that. That doesn't seem right. Next I tried tuples:
>
> >> block: [1.1.1 "One dot one" 1.2.1 "One dot two" 1.3.1 "One dot
> three"]
> == [1.1.1 "One dot one" 1.2.1 "One dot two" 1.3.1 "One dot three"]
> >> block/1.3.1
> == "One dot three"
> >> type? 1.3.1
> == tuple!
>
> Looks like tuples work correctly, but not decimal numbers. I've sent
> this to REBOL [EMAIL PROTECTED]
I did some playing with it, if your first indexing label is an alphachar, it
works ok:
>> block: [ A.2.3 thing1sub3 B.2.4 thing2sub4 C.2.5 thing3sub5 D.2.6
thing4sub6 thing3sub5 D.2.6.2 thing4sub62 ]
== [A.2.3 thing1sub3 B.2.4 thing2sub4 C.2.5 thing3sub5 D.2.6 thing4sub6
thing3sub5 D.2.6.2 thing4sub62]
>> block/d.2.6.2
== thing4sub62
>> block/c.2.5
== thing3sub5
>>
interesting.
Kat,
thinking about this some.