--- On Thu, 3/3/11, Leonardo M. Ramé <martinr...@yahoo.com> wrote: > From: Leonardo M. Ramé <martinr...@yahoo.com> > Subject: [fpc-pascal] Forward type not resolved > To: "FPC-Pascal users discussions" <fpc-pascal@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 > _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal