bok
2010-06-06 22:18:26 UTC
I haven't used Delphi in a LONNNNNGGGG time.
Using Delphi 6 \Vista...
If I declare a million element array "myarray" locally in the
button1click procedure. I get a Windows error message "project1.exe
has stopped working". If, however, I declare "myarray" as a global no
such error occurs.
============Trivial Error producing Example=================
procedure TForm1.Button1Click(Sender: TObject);
var
x,z:integer;
myarray:array[1..1000000] of integer; //***Produces error on
execution***
begin
z:=0;
for x:=1 to 1000000 do
begin
z:=z+1;
a[z]:=z;
end;
end;
============Trivial Error Free Example==================
var Form1: TForm1;
a:array[1..1000000] of integer;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
x,z:integer;
begin
z:=0;
for x:=1 to 1000000 do
begin
z:=z+1;
a[z]:=z;
end;
end;
Is this a known issue with Delphi6 or Vista? Any solutions?
Thanks,
Bok
Using Delphi 6 \Vista...
If I declare a million element array "myarray" locally in the
button1click procedure. I get a Windows error message "project1.exe
has stopped working". If, however, I declare "myarray" as a global no
such error occurs.
============Trivial Error producing Example=================
procedure TForm1.Button1Click(Sender: TObject);
var
x,z:integer;
myarray:array[1..1000000] of integer; //***Produces error on
execution***
begin
z:=0;
for x:=1 to 1000000 do
begin
z:=z+1;
a[z]:=z;
end;
end;
============Trivial Error Free Example==================
var Form1: TForm1;
a:array[1..1000000] of integer;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
x,z:integer;
begin
z:=0;
for x:=1 to 1000000 do
begin
z:=z+1;
a[z]:=z;
end;
end;
Is this a known issue with Delphi6 or Vista? Any solutions?
Thanks,
Bok