Simple Calculation

Ok guys, i was trying a not to hard calculation in flash… :wink:

// var calc, with dot. Output: 25, ok, true…
nummer=10*2.5;
trace(nummer);

// var calc, with comma. Output: 20, where did the .5 go?
nummer=10*2,5;
trace(nummer);

// direct trace, with dot. Output: 25, ok, true…
trace((10*2.5));

// direct trace, with comma. Output: 5, should be 20, when i look above…, but why 5 this time?
trace((10*2, 5));

read the comments…

On the last one - don’t know why the double quotes matter but you are putting two things in one trace comment so it outputs the final one. I tried a simple button on release statement:


on(release){
trace("yes", "no");
}

and got the expected output error of “tsk tsk! you can only trace one thing at a time numnuts!”

but using


on(release)"
trace(("yes", "no"));}

returns “no”

Cool experiment! :thumb: