[Pas2js] += notation in pas2js 1.5.1

warleyalex warleyalex at yahoo.com.br
Thu Jul 25 00:00:56 CEST 2019


I've got an fatal error when compiling the function Add (Error: Identifier
expected) using the compiler
Pas2JS Compiler version 1.5.1 [2019/07/24] for Win32 i386

The pas2js 1.4.10 it compiles as expected.

----------
{$modeswitch AdvancedRecords}
type
  TPoint = record
    x,y: word;
    function Add(const apt: TPoint): TPoint;
  end;   

implementation

function TPoint.Add(const apt: TPoint): TPoint;
begin
  Result:=Self;
  Result.x+=apt.x;   //------>>>>  this error occurr in pas2js 1.5.1
  Result.y:=Result.y+apt.y;
  Self:=apt;
 end;   
----------

Project: Executing command before: Exit code 6, Errors: 1
unit2.pas(173,12) Error: Identifier expected

------------------------




--
Sent from: http://pas2js.38893.n8.nabble.com/


More information about the Pas2js mailing list