Also bei mir funktioniert der Code-Schnipsel wunderbar.

Bringt keinen Fehler.
Poste doch auch mal den Rest, obwohl ich mir irgendwie nicht wirklich vorstellen kann, dass da irgendwas nicht stimmt, was sich auf die Privat-Declarations auswirkt.
Ansonsten kannst du auch einfach mal probieren, deinen Code-Schnipsel in einem völlig leeren Programm auszuführen also ungefähr so:
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:
| unit Unit1;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs;
type TForm1 = class(TForm) private zaehler: WORD; nenner: WORD; ganzzahl: WORD; vorzeichen: Char; public end;
var Form1: TForm1;
implementation
{$R *.dfm}
end. |