09-06-2014, 01:53 PM
بسم الله الرحمن الرحيم
الكود التالى
فى هذا السطر
if temp[i] in ['0'..'9'] then inc(nc)
بعد then ما هو دور التعليمة Inc ؟
الكود التالى
كود :
procedure TForm1.edt1Change(Sender: TObject);
var i,nc,cc,oc:integer;temp:string;
begin
nc:=0;
cc:=0;
oc:=0;
temp:=edt1.Text;
for i:=1 to length(temp) do
if temp[i] in ['0'..'9'] then inc(nc)
else
if temp[i] in ['A'..'Z','a'..'z'] then inc(cc)
else
inc(oc);
lbl2.Caption:=format('Chars Count:%d',[cc]);
lbl3.Caption:=format('Num Count:%d',[nc]);
lbl4.Caption:=format('Others:%d',[oc]);
end;if temp[i] in ['0'..'9'] then inc(nc)
بعد then ما هو دور التعليمة Inc ؟
