Re: [Flashcoders] small code question

2006-01-26 Thread Morten Barklund Shockwaved
Fumio Nonaka wrote: Using new Number is... silly. The Number-object is quite useless and can't be used for anything, that a regular number can't. Use normal numbers and use numbers: The Number object can have a property, which a regular number can't. I don't know if it is useful, though. I kn

Re: [Flashcoders] small code question

2006-01-26 Thread Fumio Nonaka
The Number object can have a property, which a regular number can't. I don't know if it is useful, though. var myVar = new Number(1); trace(myVar); // Output: 1 myVar.prop = "my property"; trace(myVar.prop); // Output: my property _ Morten Barklund Shockwaved wrote: Using new Number is...

Re: [Flashcoders] small code question

2006-01-25 Thread Morten Barklund Shockwaved
Toon Van de Putte wrote: I was wondering if the following two lines of code are just different ways of doing the same thing: var myVar = new Number(); myVar ="0"; Using new Number is... silly. The Number-object is quite useless and can't be used for anything, that a regular number can't. Use

Re: [Flashcoders] small code question

2006-01-25 Thread Roman Blöth
Toon Van de Putte schrieb: I was wondering if the following two lines of code are just different ways of doing the same thing: var myVar = new Number(); myVar ="0"; var myVar= Number("0"); Except the fact you'd never pass a string ("0") where a number is expected (0), the only difference betwe

Re: [Flashcoders] small code question

2006-01-25 Thread Johannes Boyne
But why not? In the first example you say in the first line myVar = new Number(); But not more, only that it is a number e.g not a string or a bolean. Than in the second line you say myVar = "0"; So you give it a Number. In the second example you do it in one way you say hey the variable myVar

RE: [Flashcoders] small code question

2006-01-25 Thread j.c.wichman
Grtz Hans -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Toon Van de Putte Sent: Wednesday, January 25, 2006 2:23 PM To: Flashcoders mailing list Subject: [Flashcoders] small code question I was wondering if the following two lines of code are just diff

Re: [Flashcoders] small code question

2006-01-25 Thread Martin Wood
no, they mean quite different things. In the first case you are creating a Number object, then you are assigning the string '0' to it, so it becomes a string. In the second one you are creating a Number object from a string, so you end up with the value of the string in your Number object.

[Flashcoders] small code question

2006-01-25 Thread Toon Van de Putte
I was wondering if the following two lines of code are just different ways of doing the same thing: var myVar = new Number(); myVar ="0"; var myVar= Number("0"); -- Toon Van de Putte Pannenhuisstraat 63 2500 Lier Belgium mobile: +32 (0)497 52 74 51 [EMAIL PROTECTED] ___