[mtasc] Here's a difference mtasc vs MM compiler
Keith Peters
kp at bit-101.com
Mon Apr 18 20:20:54 CEST 2005
Yeah, I found that one myself. :)
Technically, mtasc is right. The variable is already defined. I shouldn't be
redefining it.
MM is a lot more lax on stuff like that.
Keith
> -----Original Message-----
> From: mtasc-bounces at lists.motion-twin.com
> [mailto:mtasc-bounces at lists.motion-twin.com] On Behalf Of Alan
> Sent: Monday, April 18, 2005 1:53 PM
> To: mtasc at lists.motion-twin.com
> Subject: [mtasc] Here's a difference mtasc vs MM compiler
>
> I'd been wondering how to debug when using mtasc, so I was
> glad to find Bit-101's Debug class (from
> http://www.bit-101.com/blog/archives/000119.html).
>
> in Flash MX 2004 it compiles with no complaint.
>
> mtasc says:
> Debug.as:31: characters 3-19 : type error Local variable
> redefinition :
> recurseDepth
>
> The code is:
>
> public static function traceObject(o:Object,
> recurseDepth:Number, indent:Number):Void {
> if(recurseDepth == undefined){
> var recurseDepth:Number = 0;
> }
> ... etc.
>
> To me this code looks fishy. I'd have said simply
>
> recurseDepth = 0;
>
> Is there a good reason for such a construct?
> Why does MM allow it?
>
> Peter Joel recently blogged:
>
> "For some reason the guys at Motion Twin decided that they
> didn't have to make their compiler compatible with
> Macromedia's. This is my problem and the reason why I can't use it."
>
> -A
>
> --
> MTASC : no more coffee break while compiling
>
>
More information about the mtasc
mailing list