var
str:String;
PtPos:integer;
begin
str:='sljdhgls.asgi';
PtPos:=Pos('.',str);
if PtPos<>0 then//小数点在字符串中的位置
begin
end;
end;
str:String;
PtPos:integer;
begin
str:='sljdhgls.asgi';
PtPos:=Pos('.',str);
if PtPos<>0 then//小数点在字符串中的位置
begin
end;
end;
你将你的定义改为:
var
chr : string[3];
不就行了!
而且下标也是从一开始的!
如果:chr='abc';则:
->chr[1]='a';
->chr[2]='b';
->chr[3]='c';