Better decimal support (For ABCs with minor version 17)

This commit is contained in:
Jindra Petřík
2024-08-12 19:51:40 +02:00
parent 9ee2549e60
commit 534ac03314
53 changed files with 4443 additions and 91 deletions
+27
View File
@@ -0,0 +1,27 @@
package
{
import flash.display.Sprite;
import flash.events.Event;
/**
* ...
* @author Jindra
*/
public class Main extends Sprite
{
public function Main()
{
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event = null):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);
// entry point
}
}
}
+4
View File
@@ -0,0 +1,4 @@
package {
public class Number {
}
}
+6
View File
@@ -0,0 +1,6 @@
package
{
public class Object
{
}
}
+9
View File
@@ -0,0 +1,9 @@
package {
public namespace AS3 = "http://adobe.com/AS3/2006/builtin";
public const NaN: Number = 0 / 0;
public const Infinity: Number = 1 / 0;
public const undefined = void 0;
}
@@ -0,0 +1,5 @@
package __AS3__.vec {
public class Vector {
}
}
+4
View File
@@ -0,0 +1,4 @@
package {
public class decimal {
}
}
+4
View File
@@ -0,0 +1,4 @@
package {
public class int {
}
}
+30
View File
@@ -0,0 +1,30 @@
package mypkg
{
public class MyClass
{
private var attr_dec:decimal;
private var attr_int:int;
public function test(arg_d:decimal): void
{
//trace("Hello world");
//HALF_EVEN, DOWN, FLOOR, UP, CEILING, HALF_UP, HALF_DOWN
//use precision 10, rounding FLOOR;
//var arr = [];
//arg_d = arr[4];
/*var a:int = 1;
var b:int = 2;
var c:decimal = a < 3 ? a : b;*/
//this.testd(4);
var i:* = 70000;
var a:decimal = 10000000010000000002000000000300000000040000000005m;
}
private function testd(arg_d:decimal) {
}
}
}
+7
View File
@@ -0,0 +1,7 @@
include "Object.as"
include "Number.as"
include "int.as"
include "decimal.as"
include "__AS3__/vec/Vector.as"
include "TopLevel.as"
include "mypkg/MyClass.as"