var wordstr,TmpStr:string;
begin
wordstr:=trim(edit1.Text);
wile not (pos('',wordstr)=0) do
begin
TmpStr:=copy(wordstr,1,2);
//接着用你的TmpStr去查询你数据库对应的拼音字母。
wordstr:=copy(wordstr,2,length(wordstr));
end;end;
begin
wordstr:=trim(edit1.Text);
wile not (pos('',wordstr)=0) do
begin
TmpStr:=copy(wordstr,1,2);
//接着用你的TmpStr去查询你数据库对应的拼音字母。
wordstr:=copy(wordstr,2,length(wordstr));
end;end;
我觉得:
for i:=1 to length(wordstr) do
有问题,改为:
for i:=1 to (length(wordstr) div 2) do 你看可以吗???