Stack Exchange
DELPHI declaration issues
I have this module:
    unit Unit1;

    interface
    uses classes;

    type TRObject = class(TObject) // reference count Object
    private
    FRecNo: longint;
    FRefCount: integer;
    FDeleted: boolean;
    public
    property RefCount: integer read FRefCount write FRefCount default 0;
    property RecNo: longint read FRecNo write FRecNo default -1;
    property IsDeleted: boolean read FDeleted write FDeleted default FALSE;
    procedure IncRF;
    procedure DecRF;
    constructor Create; overload;
    destructor Destroy; override;
    procedure SeekAndRead(var F: FILE; at: longint); // NEVER OVERLOADED
    procedure SeekAndWrite(var F:File;at: longint);
    procedure ReadObject(var F:FILE);  //NOT OVERLOADED AS ITS THE FIRST INSTANCE
    procedure WriteObject(var F:FILE); //NOT OVERLOADED AS ITS THE FIRST INSTANCE
    end;

    type TIDObject = class(TRObject) // Object with an ID number
    private
    FID: integer;
    public
    property ID: integer read FID write FID default -1;
    constructor create;  overload;
    destructor destroy;  override;
    procedure SeekAndRead(var F:File;at: longint);
    procedure SeekAndWrite(var F:File;at: longint);
    procedure ReadObject(var F: FILE); overload;
    procedure WriteObject(var F:FILE); overload;
    end;

    type TKeyObject = class(TRObject) // The key
    private:
    public:
    end;
    {
    private:
    FKey: string;
    public:
    property Key: string read FKey write FKey;
    constructor create; overload;
    destructor Destroy; override;
    procedure SeekAndRead(var F: File;at: longint);
    procedure ReadObject(var F: FILE); overload;
    procedure WriteObject(var F: FILE);overload;
    end;
    }
    implementation

    end.

I've not included the implementation part because, honestly, it is irrelevant to the problem. What I have is this message during compilation:
[Error]unit1.pas[39]: 'END' expected but ':' found
I looked carefully and I just do not see where the error is... I know it's syntax, but damn it, what is it? The compiler does this the moment I put the word Private: (or Public:) in the declaration of TKeyObject. If I have an empty TKeyObject class, it does not give the error message (but what use is it when I can't get the structure in place? HELP!

Damn it! I FOUND the error! the private had an ugly : tied to it... :( Call me a fool all you want, but sometimes it takes writing down a think it out text to see the bear in the bathtub!

On a side note, you should really work on formatting. Had your code been properly indented, you probably would have caught this error quicker.

type
  TKeyObject = class(TRObject) // The key
  private:
  public:
  end;

Remove the erroneous : symbols.
That's what the compiler meant in its error message. It found : where that is invalid. So, search for the colons. 
