Board index » delphi » Units and "type mismatch" error

Units and "type mismatch" error

I need your help.   With regard to the subject heading....

If you're up to it, let me know and I'll send you the source code
via e-mail-attach....  it's the only way to see the problem occuring.

 

Re:Units and "type mismatch" error


Quote
ag...@ccn.cs.dal.ca (Don Bonin) wrote:
>I need your help.   With regard to the subject heading....
>If you're up to it, let me know and I'll send you the source code
>via e-mail-attach....  it's the only way to see the problem occuring.

Try posting your specific problem.

Re:Units and "type mismatch" error


Quote
ag...@ccn.cs.dal.ca (Don Bonin) wrote:
>I need your help.   With regard to the subject heading....
>If you're up to it, let me know and I'll send you the source code
>via e-mail-attach....  it's the only way to see the problem occuring.

Hi

AFAIK declarations like

program A;

uses B;

type
  PInt = ^Integer;

var
  IntP : PInt;

   Proc( IntP); { here you'll get type mismatch }

.....

unit B;

interface

type
  PInt = ^Integer;

  procedure Proc( IntPtr : PInt);

can cause this problem. Do not declare the same type in two places
even the declarations are the same.
If it's not the reason - you can email me your code, or better just
post a new article with some code (not too much).

Cheers
  Dmitri
--------------------------------------------------------------
        Shit happens, but why it always happens to us?
--------------------------------------------------------------
Dmitri Poujlivyi            mailto:  dmi...@god.bel.alcatel.be
                            http://www.dma.be/p/bewoner/dmitri

Other Threads