Welcome, Guest
Username: Password: Remember me
Discussions for CodeTyphon Object Pascal Programming Language
  • Page:
  • 1

TOPIC:

Not clear close the program!!! problem IDE?! 7 years 2 months ago #11046

  • Tigr
  • Tigr's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 54
  • Thank you received: 1
When performing a simple task, namely filling a three-dimensional array, the program suddenly for no reason just destroyed....( CT 6.2



var
mas:array[1..2097151,1..2097151,1..2097151] of integer;

///....////
procedure TForm1.Button1Click(Sender: TObject);
var i,j,k:integer;
begin
for i:=1 to 2097151 do
begin
for j:=1 to 2097151 do
begin
for k:=1 to 2097151 do
begin
mas[i,j,k]:=1;
end;
end;
end;
form1.Memo1.Lines.Add('dfbdfbdb');
end;

Please Log in or Create an account to join the conversation.

Last edit: by Tigr.

Not clear close the program!!! problem IDE?! 7 years 2 months ago #11047

  • Tigr
  • Tigr's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 54
  • Thank you received: 1
after restarting the program from the environment .... there is a bug:
failed to execute:193

Please Log in or Create an account to join the conversation.

Not clear close the program!!! problem IDE?! 7 years 2 months ago #11048

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4538
  • Thank you received: 1116
Sir
don't use so big numbers (2097151) in multi dimension arrays

wiki.freepascal.org/Integer

this sample work OK
var
  mas: array[1..100, 1..100, 1..100] of integer;

procedure TForm1.Button1Click(Sender: TObject);
var
  i, j, k: integer;
begin
  for i := 1 to 100 do
  begin
    for j := 1 to 100 do
    begin
      for k := 1 to 100 do
      begin
        mas[i, j, k] := 1;
      end;
    end;
  end;

  form1.Memo1.Lines.Add('dfbdfbdb');
end;
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

Not clear close the program!!! problem IDE?! 7 years 2 months ago #11049

  • Tigr
  • Tigr's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 54
  • Thank you received: 1
Thank you! I'm just under forgot for a moment that program need a lot of memory!
when I'm on the calculator counted realized what a fool!

Please Log in or Create an account to join the conversation.

Last edit: by Tigr.

Not clear close the program!!! problem IDE?! 7 years 2 months ago #11050

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4538
  • Thank you received: 1116
have fun...:)
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.
  • Page:
  • 1