[Pas2js] unexpected Const in Math unit
Mattias Gaertner
nc-gaertnma at netcologne.de
Sun May 6 16:25:45 CEST 2018
On Sun, 6 May 2018 09:12:11 -0500 (CDT)
warleyalex via Pas2js <pas2js at lists.freepascal.org> wrote:
> 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 ;)
Please create a Lazarus bug report.
Mattias
More information about the Pas2js
mailing list