我在Dll文件引用Ord()函数是系统提示[Error] MessageCheck.pas(227): Incompatible types.

解决方案 »

  1.   

    错误为不兼容的类型。
    function Ord(x):longint;
    返回一个序数类型所对应的顺序值。
    你检查一下你的程序中Ord函数的参数值和返回值看是否为所要求的类型。
      

  2.   

    顺便贴一个例子你看看,如果还有问题,请贴你的代码让我看看
    ////////////////////////////////////////////////////
    uses Dialogs;
    type   Colors = (RED,BLUE,GREEN);var  S: string;
     begin
       S := 'BLUE has an ordinal value of ' + IntToStr(Ord(BLUE)) + #13#10;
       S := S + 'The ASCII code for "c" is ' + IntToStr(Ord('c')) +  ' decimal';
       MessageDlg(S, mtInformation, [mbOk], 0, mbOK);
     end;