You were right pstudio...I had to change the code:
Code:
namespace pgd_test;
interface
type
ConsoleApp = class
public
class method Main(args: array of String);
end;
implementation
class method ConsoleApp.Main(args: array of String);
const
cols = 78;
lines = 30;
chars = " .,:;=|iI+hHOE#$-";
maxIter = length(chars);
begin
var minRe := -2.0;
var maxRe := 1.0;
var minIm := -1.0;
var maxIm := 1.0;
var im := minIm;
while im <= maxIm do
begin
var re := minRe;
while re <= maxRe do
begin
var zr := re;
var zi := im;
var n: Integer := -1;
while n < maxIter-1 do
begin
inc(n);
var a := zr * zr;
var b := zi * zi;
if a + b > 4.0 then
Break;
zi := 2 * zr * zi + im;
zr := a - b + re;
end;
System.out.print(chars.charAt(n));
re := re + ((maxRe - minRe) / cols);
end;
System.out.println;
im := im + ((maxIm - minIm) / lines)
end;
//Press ENTER to continue
//system.out.println("Press ENTER to exit");
System.in.read();
end;
end.
Bookmarks