Board index » delphi » Error message: "Incompatible types"

Error message: "Incompatible types"

Hello ! !
        I have some problems with incompatible types in my source code.  Let
me familiarise you a little bit with my program :

procedure M (x,y : Double) ;
begin
  area.MoveTo (Vector 2D (x,y)) ;          (Incompatible type "Integer" and    
                                                          "TVector")
end ;

----------------------------------------------------

procedure DrawGraph....
begin
.
.
  DrawGraph (Bitmap, GraphPoints) ;        (Incompatible type "TCanvas" and    
                                                              "Integer")
.
end ;

---------------------------------------------------

procedure ButtonPrintClick (Sender : TObject) ;
begin
.
.
 DrawGraph (Printer.Canvas, ptPrintGraph) ;     (Incompatible type "TBitmap"  
                                                                and "TCanvas")
.
end ;

---------------------------------------------------

Ive tried everything I know but nothing worked.  Maybe because Im new with
Delphi and I  still have a lot to learn ! :)
Please help me ! !

Thanks in advance .

 

Re:Error message: "Incompatible types"


Quote
DEA wrote in message <9OBC1.214$d3.4071...@carnaval.risq.qc.ca>...
>Hello ! !
>        I have some problems with incompatible types in my source code.
Let
>me familiarise you a little bit with my program :

>procedure M (x,y : Double) ;
>begin
>  area.MoveTo (Vector 2D (x,y)) ;          (Incompatible type "Integer" and
>                                                          "TVector")

If Area is of type TCanvas, MoveTo is defined as
MoveTo(X, Y: Integer)

I have no idea what Vector 2D (x,y) is.

But in any case Moveto is looking for two discrete variables.

        -- Kirk

Re:Error message: "Incompatible types"


We need to see more of the source code - you're omitting key details

Charles Johnson

Other Threads