Forum: Algorithmen, Datenstrukturen und Klassendesign
by sakura,
27. Okt 2017
Sorry, stimmt. Aber gerade da ist es dann sinnvoll diese einmalig zu initialisieren und dann die Werte nur noch über read-only Properties zu ermitteln. :oops: type
TPosition = record
private
FX, FY, FZ: Integer;
public
class function New(const aX, aY, aZ: Integer): TPosition; static;
property X: Integer read FX;
property Y: Integer read FY;
property Z: Integer...
Forum: Algorithmen, Datenstrukturen und Klassendesign
by sakura,
27. Okt 2017
Gerne wird vergessen, dass in Delphi auch Folgendes für Records möglich ist:type
TPosition = record
private
FX, FY, FZ: Integer;
procedure SetX(const Value: Integer);
procedure SetY(const Value: Integer);
procedure SetZ(const Value: Integer);
public
property X: Integer read FX write SetX;