[fpc-pascal] converting TjanSQL
Michael Van Canneyt
michael at freepascal.org
Tue Mar 21 10:04:15 CET 2006
On Tue, 21 Mar 2006, Bisma Jayadi wrote:
>> Turn on delphi mode for the package and/or add {$mode delphi} everywhere.
>> (big chance that you have to change the @'s back).
>
> I just did this, turn on Delphi mode on every single unit. To make sure the
> class is compiled correctly, though I'd change them later to FPC_OBJFPC mode
> for better and cleaner syntax. But I'll do it later, after this convertion is
> done and the code run as expected (within Delphi mode).
>
>> Without it, it is possible that you now have shortstrings in a lot of
>> places.
>
> I also did this, turn on LongString mode on every single unit.
>
> And, unfortunately... I stuck at janSQL unit (main unit of TjanSQL class) at
> the class constructor method. It's at FEParser.onGetVariable assignment, for
> precise. Now, FPC can't compile it because of this. Here is the code of the
> class' constructor:
>
> ---
> constructor TjanSQL.create;
> begin
> DecimalSeparator:='.';
> FQueries:=TList.create;
> gen:=TStringList.create;
> FSQL:=TStringList.create;
> FNameSpace:=TmwStringHashList.create
> (tinyhash,HashSecondaryOne,HashCompare);
> FEParser:=TjanSQLExpression2.create;
>
> FEParser.onGetVariable:=getvariable; // <- here the compiler stucked!
>
> FrecordSets:=TjanRecordSetList.Create;
> end;
> ---
>
> The error message is "Incompatible type for arg no.1: Got...". If I changed
> the line into this
Can you give the whole error message ?
Michael.
More information about the fpc-pascal
mailing list