Einzelnen Beitrag anzeigen

Benutzerbild von 3_of_8
3_of_8

Registriert seit: 22. Mär 2005
Ort: Dingolfing
4.129 Beiträge
 
Turbo Delphi für Win32
 
#1

Array-Konstanten übergeben

  Alt 24. Jan 2006, 20:22
Hallo!

Ich habe eine Prozedur, die als Parameter ein dynamisches Array erwartet. Wie mache ich das?

Delphi-Quellcode:
type
  TMyEnum=(enA, enB, enC, enD);
  TMyArray=array of TMyEnum;
  TMyClass=class(TObject)
  private
    procedure MyProc(a: TMyArray);
  end;

//...

procedure TMyClass.MyProc(a: TMyArray);
begin
//Code
end;
So will ich das aufrufen:

MyProc((enA, enC, enD));

Aber das gibt ne schööne Fehlermeldung, Syntaxfehler, gleich beim ersten Komma.
Manuel Eberl
„The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.“
- Terry Pratchett
  Mit Zitat antworten Zitat