[fpc-pascal] FPC - Compile To Android (ARM) On Mac
Hi, Has anyone got this right and wiling to share some knowledge? cheers Lennie ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Forward type not resolved
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" Leonardo M. Ramé http://leonardorame.blogspot.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Forward type not resolved
--- On Thu, 3/3/11, Leonardo M. Ramé wrote: > From: Leonardo M. Ramé > Subject: [fpc-pascal] Forward type not resolved > To: "FPC-Pascal users discussions" > 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
Re: [fpc-pascal] Forward type not resolved
On 3/3/2011 17:15, Leonardo M. Ramé wrote: Sorry, the error was here: TOnSqueeze = procedure (AQuote: TQuote); of object; This line should be: TOnSqueeze = procedure (AQuote: TQuote) of object; amazing what a misplaced semi-colon will do, eh? ;) i would have thought that there would have been an additional error concerning the trailing "of object"... was there? did it give a clue as to the actual error of the misplaced semi-colon? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Forward type not resolved
im still trying to understand how the compiler understood that sentence in order to generate THAT specific error... (while ignoring a totally out of place 'of' token) 2011/3/3 waldo kitty : > On 3/3/2011 17:15, Leonardo M. Ramé wrote: >> >> Sorry, the error was here: >> >> TOnSqueeze = procedure (AQuote: TQuote); of object; >> >> This line should be: >> >> TOnSqueeze = procedure (AQuote: TQuote) of object; > > amazing what a misplaced semi-colon will do, eh? ;) > > i would have thought that there would have been an additional error > concerning the trailing "of object"... was there? did it give a clue as to > the actual error of the misplaced semi-colon? > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Forward type not resolved
Am 04.03.2011 01:46, schrieb waldo kitty: > On 3/3/2011 17:15, Leonardo M. Ramé wrote: >> Sorry, the error was here: >> >> TOnSqueeze = procedure (AQuote: TQuote); of object; >> >> This line should be: >> >> TOnSqueeze = procedure (AQuote: TQuote) of object; > > amazing what a misplaced semi-colon will do, eh? ;) > > i would have thought that there would have been an additional error > concerning the trailing "of object"... was there? did it give a clue as > to the actual error of the misplaced semi-colon? c:\fpc>fpc test.pp Free Pascal Compiler version 2.4.2 [2010/11/10] for i386 Copyright (c) 1993-2010 by Florian Klaempfl Target OS: Win32 for i386 Compiling test.pp test.pp(7,12) Error: Forward type not resolved "TQuote" test.pp(9,44) Fatal: Syntax error, "BEGIN" expected but "OF" found Unfortunatly, Leonardo did not post a complete example but this is what I get by guessing the missing parts. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal