[Flashcoders] [AS3] optional parameters - sans defaults for Boolean/Number/int

2008-02-29 Thread Jesse Graupmann
I'm trying to create typed functions using optional parameters sans the defaults. I'm finding String to be the only thing that allows for null to be passed. Is there a way to extend that functionality to other types like; Numbers, Booleans, and/or ints? NOTE : I am aware of ...rest and passing an

Re: [Flashcoders] [AS3] optional parameters - sans defaults for Boolean/Number/int

2008-02-29 Thread Glen Pike
Hi, You can have * to specify any parameter: function myFunc(param1:Boolean, param2:*); Matthew Houliston wrote: don't you mean function test2 ( a:Boolean = false ) { trace( a: + ( a == true ) ); } ? A Boolean is never null. var b:Boolean; trace(b);