主题:出错了;Incompatible types
我编写了一个函数;在使用是出现如下错误;
[Error] UDll.pas(169): Incompatible types: 'Char' and 'String'
请高手指点:谢谢
function UniCodeToGB5(s:String):WideString;
var
P:PWord;
I,RealLen:Integer;
sStr:WideChar;
begin
New(p);
RealLen:=Length(s) div 4;
for I:=0 to RealLen - 1 do begin
P^:=HexToInt(Copy(s,4*I+1,4));----[color=FF0000]出错的地方[/color]
Move(P^,sStr,2);
Result:=Result+sStr;
end;
Dispose(P);
end;
[Error] UDll.pas(169): Incompatible types: 'Char' and 'String'
请高手指点:谢谢
function UniCodeToGB5(s:String):WideString;
var
P:PWord;
I,RealLen:Integer;
sStr:WideChar;
begin
New(p);
RealLen:=Length(s) div 4;
for I:=0 to RealLen - 1 do begin
P^:=HexToInt(Copy(s,4*I+1,4));----[color=FF0000]出错的地方[/color]
Move(P^,sStr,2);
Result:=Result+sStr;
end;
Dispose(P);
end;