There is another difference. You can assign a * variable to anything
else while an Object variable needs to be casted.

var x : *;
var y : Object;

var string : String;
var uicomp : UIComponent;
var bool : Boolean;
var num : Number;
var arr : Array;
var i : int;
var obj : Object;

string = x;
string = y; //error
num = x;
num = y; //error
i = x;
i = y; //error
bool = x;
bool = y; //huh, no error? implicit conversion?
arr = x;
arr = y; //error
uicomp = x;
uicomp = y; //error

Cheers
Ralf.

On Tue, Dec 23, 2008 at 7:06 PM, Alex Harui <aha...@adobe.com> wrote:
> '*' can hold the value undefined.  Object cannot, it can only hold null.
>
>
>
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of luvfotography
> Sent: Tuesday, December 23, 2008 9:05 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] What is '*' in class type?
>
>
>
> Hi, I saw this in someone's code:
>
> public function parseResult( result:*):Array {
>
> if( result is XML || result is XMLList ) {
> . . . .
> ...
>
> what is the '*' , is this the same as (result:object) ?
> where result can be any type of object?
>
> 

Reply via email to