list! bug
[1/6] from: rotenca::telvia::it at: 27-May-2002 15:36
Is this a bug?
>> to-list 1
== make list! []
---
Ciao
Romano
[2/6] from: greggirwin:mindspring at: 27-May-2002 9:05
Hi Romano,
<< Is this a bug?
>> to-list 1
== make list! []
>>
I'd say so.
--Gregg
[3/6] from: ingo:2b1 at: 27-May-2002 16:51
Hi Romano,
Romano Paolo Tenca wrote:
> Is this a bug?
>
>>>to-list 1
>>
> == make list! []
No, it's no bug, just not too intuitive.
For most datatypes
to-"datatype" value
converts the value into the other datatype, but in the special case of
to-"any-series-datatype" an-integer
A new series is created, with an initial size of an-integer.
Kind regards,
Ingo
[4/6] from: greggirwin:mindspring at: 27-May-2002 10:16
Hi Ingo,
<<...in the special case of
to-"any-series-datatype" an-integer
A new series is created, with an initial size of an-integer. >>
Then why do to-block and to-hash work correctly?
>> to-hash 1
== make hash! [1]
>> to-block 1
== [1]
>> to-list 1
== make list! []
--Gregg
[5/6] from: g:santilli:tiscalinet:it at: 27-May-2002 18:34
Hi Ingo,
On Monday, May 27, 2002, 4:51:06 PM, you wrote:
IH> converts the value into the other datatype, but in the special case of
IH> to-"any-series-datatype" an-integer
IH> A new series is created, with an initial size of an-integer.
Nope, that's for MAKE, not for TO. What Romano showed looks like a
bug to me.
Regards,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r
[6/6] from: ingo:2b1 at: 28-May-2002 0:42
Thanks Gabriele,
I stand corrected ... out to find that thinking brain dog now ;-)
Ingo
Gabriele Santilli wrote: