D dhl2001 Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-10 #2 var a:string;i:integer; begin for i:=0 to length(a)-1 do begin if a='a' then showmessage('the first char is a'); end; end;
var a:string;i:integer; begin for i:=0 to length(a)-1 do begin if a='a' then showmessage('the first char is a'); end; end;
南 南宫吹云 Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-10 #3 var s:string; c:array of char; begin setlength(c,length(s)); for i:=0 to length(s)-1 do c:=s[i+1];
Z zw84611 Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-10 #4 可能是太简单,没人愿意答。 s:string; c:array [1..100]of char; for i:=1 to length(s) do c:=s;
套 套牢 Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-10 #5 直接一点 判断字符串中的一个字母是否是数字 str1:string; copy(str1,1,1) in ['0'..'9'] 肯定不匹配,怎么办?
Z zw84611 Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-10 #6 if (s>'0') and (s<'9') then 是数字。
U ugvanxk Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-10 #7 s:string; cc:array[0..100] of char; begin s:='123'; strpcopy(cc,s); if cc[0] in['0'..'9'] then showmessage('ok'); 刚刚运行通过
s:string; cc:array[0..100] of char; begin s:='123'; strpcopy(cc,s); if cc[0] in['0'..'9'] then showmessage('ok'); 刚刚运行通过