9个数字var t: char;if length(astring) = 9
begin
for i:= 1 to length(astring)
t:= pos(astring,i,1)
if not isnumberic(t) then
begin
showmessage('Error')
break;
end
end;
begin
for i:= 1 to length(astring)
t:= pos(astring,i,1)
if not isnumberic(t) then
begin
showmessage('Error')
break;
end
end;
begin
Result:=Length(s)=9;
if Result then
for i:=1 to 9 do
if not(s[i] in ['0'..'9']) then Result:=false;
end;
var
i:integer;
t,astring : string;// to be test;
begin
if length(astring) = 9 then
begin
for i:= 1 to length(astring) do
begin
t:= copy(astring,i,1);
if pos(t,'0123456789')=0 then
begin
showmessage('Error');
break;
end;
end;
end;
end;
begin
Result:=Length(s)=9;
if Result then
for i:=low(S) to hi(s) do
if not(s[i] in ['0'..'9']) then Result:=false;
end;