Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#3

AW: Unit-Übergreifende Prozedur

  Alt 30. Mär 2011, 17:48
Hallo,

So gehts:

Delphi-Quellcode:
unit Unit2;

interface

procedure Ausfuehren;

implementation

procedure Ausfuehren;
begin
  // Code
end;

end.
Delphi-Quellcode:
unit Unit1;

interface

uses Forms, ..., Unit2; // hier Unit2 einbinden

type
  TForm1 = class(TForm1)
    ...
  public
    procedure Irgendwas;
  end;

implementation

// ODER hier
//uses Unit2;

procedure TForm1.Irgendwas;
begin
  Ausfuehren; // Aufrufen
end;

end.
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."

Geändert von Neutral General (30. Mär 2011 um 17:50 Uhr)
  Mit Zitat antworten Zitat