Registriert seit: 24. Jul 2003
Ort: Kassel
138 Beiträge
Delphi 6 Professional
|
Re: Warum macht das großen Array Probleme?
1. Mai 2006, 03:07
Hi,
Variante A:
Delphi-Quellcode:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
tile1: array of array of array of Integer;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
SetLength(tile1, 16, 16, 1024);
end;
end.
Variante B:
Delphi-Quellcode:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
TMap = array[1..16, 1..16, 1..1024] of Integer;
PMap = ^TMap;
var
Form1: TForm1;
tile1: PMap;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
New(tile1);
end;
end.
Proceduren und Funktionen kommen zwischen begin/end und Variablen in den var-Block...
Aya~
I aim for my endless dreams and I know they will come true!
S: String = #86^)^3^)^4#58#32^(^4^4^0#58#47#47^7^7^7#46^+^/^3^(^)^'^!^9^!#46^$^%;
|
|
Zitat
|