t-edson / P65Pas

CPU 6502 Pascal Compiler/IDE/Debugger
GNU General Public License v3.0
123 stars 27 forks source link

Simple test program cannot be compiled. #36

Closed at91rm9200 closed 2 years ago

at91rm9200 commented 2 years ago

Hello,

the latest version 0.9.2 fails to compile the following program:

program test;
{$MODE PASCAL}

var
  xx: Array[10] of Byte;

procedure Run;
var
   b: Byte;
begin
   for b:= 0 to 9 do begin
      xx[b]:= b;
   end;
end;

begin
   Run;
end.

The error messages is: “test3[7,11] Error: Function Run not implemented.”

Version 0.7.6 can compile this without problem.

Regards, Bernd.

t-edson commented 2 years ago

I confirmed it. It's fixed now. It was a consequence of the redesign of the core of the compiler. It was interpreting the function as a FORWARD declaration. Additionally, array support is not complete but the sample code can compile.

at91rm9200 commented 2 years ago

Thank you.

Regards, Bernd.