B
bluesadman
Unregistered / Unconfirmed
GUEST, unregistred user!
var
c: integer;
wpc: PWideChar;
begin
wpc:='This is a String';
for c := 0 to Length(wpc) - 1 do
begin
if wpc[c] = WideChar(' ') then
begin
wpc[c] := WideChar(0);
if wpc = 'This is' then
break;
else
wpc[c] := WideChar(' ');
end;
end;
end;
运行到 wpc[c] := WideChar(0);
会报错,这个问题很奇怪
c: integer;
wpc: PWideChar;
begin
wpc:='This is a String';
for c := 0 to Length(wpc) - 1 do
begin
if wpc[c] = WideChar(' ') then
begin
wpc[c] := WideChar(0);
if wpc = 'This is' then
break;
else
wpc[c] := WideChar(' ');
end;
end;
end;
运行到 wpc[c] := WideChar(0);
会报错,这个问题很奇怪