We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6622220 commit 34b0737Copy full SHA for 34b0737
TestHScript.hx
@@ -33,6 +33,10 @@ class TestHScript extends TestCase {
33
assertScript("- 123",-123);
34
assertScript("1.546",1.546);
35
assertScript(".545",.545);
36
+ assertScript("1e5",100000);
37
+ assertScript("1.2e2",120);
38
+ assertScript("100e-2",1);
39
+ assertScript("1.2e-1",0.12);
40
assertScript("'bla'","bla");
41
assertScript("null",null);
42
assertScript("true",true);
hscript/Parser.hx
@@ -1943,6 +1943,8 @@ class Parser {
1943
}
1944
if( pow == null )
1945
invalidChar(char);
1946
+ if( exp == 0 )
1947
+ exp = 10;
1948
return TConst(CFloat((Math.pow(10, pow) / exp) * n * 10));
1949
case ".".code:
1950
if( exp > 0 ) {
0 commit comments