[fpc-pascal] Forward type not resolved

Leonardo M. Ramé martinrame at yahoo.com
Thu Mar 3 23:15:50 CET 2011


--- On Thu, 3/3/11, Leonardo M. Ramé <martinrame at yahoo.com> wrote:
> From: Leonardo M. Ramé <martinrame at yahoo.com>
> Subject: [fpc-pascal] Forward type not resolved
> To: "FPC-Pascal users discussions" <fpc-pascal at lists.freepascal.org>
> Date: Thursday, March 3, 2011, 8:06 PM
> Hi, I'm trying to create a forward
> declaration for a class, as I use to do in Delphi, but I'm
> getting "Forward type not resolved". How can I troubleshoot
> this?.
> 
> Here's the code:
> 
> {$mode objfpc}{$H+}
> 
> interface
> 
> uses
>   Classes, SysUtils; 
> 
> type
>   TQuote = class; // forward declaration.
> 
>   TOnSqueeze = procedure (AQuote: TQuote); of object;
> 
>   { TQuote }
> 
>   TQuote = class(TCollectionItem)
>   private
>     FAdjClose: Double;
>     FBBand_Diff: Double;
>   ...
> 
> And, this is the error I'm getting:
> 
> quote.pas(11,12) Error: Forward type not resolved "TQuote"
> 

Sorry, the error was here:

   TOnSqueeze = procedure (AQuote: TQuote); of object;

This line should be:

   TOnSqueeze = procedure (AQuote: TQuote) of object;

Leonardo M. Ramé
http://leonardorame.blogspot.com

> 


      



More information about the fpc-pascal mailing list