t-edson / P65Pas

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

Block too long with longer for-loops #44

Closed Skertan closed 1 year ago

Skertan commented 1 year ago

The following program gives an error: "main[19,1] Error: Block to long." (should be "Block too long.") Dependent on the amount of code inside the for-loops the message appears twice. The error appears during editing with "after edit" -> "do complete compilation.", and also when compiling. It creates a *.PRG file but it is not runnable. Program version 1.0.0 from 2022-11-02 20:59:04

program test;
var i,j,k:word;
begin
  k:=0;
  for i:=0 to 2 do
    for j:=0 to 2 do
      k := k + 1;
      k := k + 2;
      k := k + 3;
      k := k + 4;
      k := k + 5;
    end;
  end;
end.
t-edson commented 1 year ago

Hi. This problem should be fixed in the trunk version. Please test.

Skertan commented 1 year ago

Hello, I tested it with the small test program and with my whole program that brought up the double error.

It works with both programs, they compile and run.

Thank you for the fast support!

Skertan commented 1 year ago

Issue resolved