>>> t: to-tuple "1.1"
> == 1.1.0
Interesting. Taken to extremes:
>> t: to-tuple "1"
== 1.0.0
>> length? t
== 1
>> t: to-tuple ""
== 0.0.0
>> length? t
== 1
>>
but how usefull is all this? ;)
Regards,
Ashley
--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] wi
ey Trüter" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, January 12, 2004 8:12 PM
> Subject: [REBOL] Re: Tuples versus Deciamls
>>> Is, for example, 1.1 a tuple or a decimal?
>> Decimal, a tuple must have at least three components. Perhaps
&
Hi Behrang,
BS> In the section about the tuples in quickstart it's not
BS> stated that a tuple must at least have 3 elements.
And they can have up to 10 elements.
BS> So I said to myself "there should be some ambiguity
BS> between decimals and tuples" although I was sure that
BS> I'm wrong.
Le
Hi
The Docs and Tutorials are awesome compared to many
other languages/tools/compilers docs but are very
informal.
In the section about the tuples in quickstart it's not
stated that a tuple must at least have 3 elements. So
I said to myself "there should be some ambiguity
between decimals and tu
It is easy to find somethings out from the console:
type? 1.1
type? 1.1.2
If it is an object then you can probe it to find out information:
a: make object! [b: "test" c: 12 d: 1.87]
probe a
probe a/d
type? a/d
--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED]
rüter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 12, 2004 8:12 PM
Subject: [REBOL] Re: Tuples versus Deciamls
>
> > Is, for example, 1.1 a tuple or a decimal?
>
> Decimal, a tuple must have at least three components. Perhaps pair! is
> wha
Hi again,
Without knowing much I think 1.1 is a decimal but nevertheless
it can be used for both datatypes. However you'll have to use
the 'to-tuple word to ask REBOL to convert the decimal
to the second one as is :
my-tuple: to-tuple 1.1
print type? my-tuple
May be others can help better,
Behrang wrote:
> Is, for example, 1.1 a tuple or a decimal?
Let's ask Rebol:
>> type? 1.1
== decimal!
According to Rebol, 1.1 is a decimal value.
--
Andrew J Martin
ICQ: 26227169
http://www.rebol.it/Valley/
http://valley.orcon.net.nz/
http://Valley.150m.com/
-><-
--
To unsubscribe from this l
> Is, for example, 1.1 a tuple or a decimal?
Decimal, a tuple must have at least three components. Perhaps pair! is
what you want? ;)
Regards,
Ashley
--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.