Autor Beitrag
Luke1410
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 31



BeitragVerfasst: Do 07.07.05 13:56 
Beim Versuch folgenden VCL.Net Code mit Delphi 2005 zu compilieren bekomme ich in der markierten Zeile diesen Compilerfehler:[Error] Unit1.pas(34): E2307 NEW standard function expects a dynamic array type identifier

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;
{$UNSAFECODE ON}
type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject); unsafe;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

  pTest = ^tTest;
  tTest = record
     value1 : integer;
  end;

var
  Form1: TForm1;

implementation

{$R *.nfm}

procedure TForm1.FormCreate(Sender: TObject); unsafe;
var
   test : pTest;
begin
   test := new(tTest); // <- Zeile 34
end;

end.


Kann mir jmd auf die Sprünge helfen, was ich falsch mache?
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Do 07.07.05 14:16 
einfach nur

new(test);

_________________
wer andern eine grube gräbt hat ein grubengrabgerät
- oder einfach zu viel zeit
Luke1410 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 31



BeitragVerfasst: Do 07.07.05 14:27 
Danke für deine schnelle Antwort. Trotz deiner Änderung wird aber weiterhin der gleiche Compilerfehler ausgelöst.