[DUG] Compiling problems
Jeremy North
jeremy.north at gmail.com
Fri Sep 9 14:34:46 NZST 2005
You must have another method called Length that is being picked up by
the compiler. Fully qualify your call to the Length function
(System.Length).
cheers,
Jeremy
On 9/9/05, Mark Howard <mhoward at pslog.co.nz> wrote:
> Help - I'm tearing my hair out!
>
> I am trying to add a feature that already exists in one of my app's reports to another three reports.
> Although this may distract from the real problem - hear is the code, for the sake of completeness:
>
> procedure TOwnDet1.ChildBand1BeforePrint(Sender: TQRCustomBand;
> var PrintBand: Boolean);
> begin
> CommentsMemo.Lines.Clear;
> CommentsMemo.Lines.Add(
> QueryDataModule.LogRepQ.FieldByName('Comment').AsString);
> if Length(CommentsMemo.Lines.Text) > 2 then <<<<HERE
> ChildBand1.Height := CommentsMemo.Height + 2
> else
> ChildBand1.Height := 0;
> end;
>
> This code compiles fine in the original report unit but I get
> "Missing operator or semicolon" and
> "Incompatible types"
> both on the line indicated when I put the code into another report unit.
>
> In fact the problem is with the Length function because I get the same errors if the code reads
> Length('abcdefg');
>
> Yet I can add the same code into another report unit and again there is no error.
>
> A possible clue is that the 2 units where no errors occur are located in a different project subdirectory to the 2 other units where the compiler errors do occur.
>
> Can anyone suggest what may be going on here. (I would be very grateful - this was supposed to be a half hour job!)
>
> TIA Mark
> --
> Forest Production Systems Ltd
> Creators of PSLog - A harvesting information system
> www.pslog.co.nz
> Skype: markhoward
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.10.19/93 - Release Date: 8/09/2005
>
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
>
More information about the Delphi
mailing list