function Tcharcode.getcharcode(const getcharcode: WideString): WideString;
var
q,w,qw :integer;
hz:string[3];
begin
if getcharcode <> '' then
begin
hz:=getcharcode;
q:= ord(hz[1]);
w:= ord(hz[2]);
if q > 160 then
q:= q-160
else
q:= q-31;
if w > 160 then
w:= w-160
else
w:= w-31;
qw := q*100+w;
result:=format('%4d',[qw]);
end;
end; 在学习delphi的com组件,运行时,这段代码中的result:=format('%4d',[qw]); 报错 提示[ Undeclared identifier: 'format',如何处理?
var
q,w,qw :integer;
hz:string[3];
begin
if getcharcode <> '' then
begin
hz:=getcharcode;
q:= ord(hz[1]);
w:= ord(hz[2]);
if q > 160 then
q:= q-160
else
q:= q-31;
if w > 160 then
w:= w-160
else
w:= w-31;
qw := q*100+w;
result:=format('%4d',[qw]);
end;
end; 在学习delphi的com组件,运行时,这段代码中的result:=format('%4d',[qw]); 报错 提示[ Undeclared identifier: 'format',如何处理?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货