[Pas2js] unexpected Const in Math unit
warleyalex
warleyalex at yahoo.com.br
Sun May 6 16:12:11 CEST 2018
There's a minor issue when you include the Math unit at the project, it seems
this unit contain unexpected constants.
----------------------
[CODE]
program project1;
{$mode objfpc}
uses
JS, Classes, SysUtils, Web, Math;
begin
// Your code here
console.log('testing');
///---> PRESS CTRL SPACE
end.
[/CODE]
-----------------------
When you press CTRL SPACE to invoke to code completion, an error
--> math.pas(30,14) Error: expected =, but ; found
workaround it would be replace "const" to "var" at:
var {const}
NaN: Double; external name 'NaN';
Infinity: Double; external name 'Infinity';
NegInfinity: Double; external name '-Infinity';
this worked for me ;)
--
Sent from: http://pas2js.38893.n8.nabble.com/
More information about the Pas2js
mailing list