02-08-2010, 04:38 PM
و عليكم السلام و رحمة الله و بركاته
- راجع طريقة كتابة الحلقات :
طريقة أخرى :
بالتوفيق,,
- راجع طريقة كتابة الحلقات :
PHP كود :
Uses
StrUtils;
procedure TForm1.btn1Click(Sender: TObject);
begin
case AnsiIndexStr(cbb1.Text,['Ahmad', 'Yacine','Mohemmad']) of
-1: ShowMessage('!!!');
0: ShowMessage('Ahmad');
1: ShowMessage('Yacine');
2: ShowMessage('Mohemmad');
//Else...
end;
end;
PHP كود :
procedure TForm1.btn1Click(Sender: TObject);
const
NamArr: array [0..2] Of string = ('Ahmad', 'Yacine','Mohemmad');
begin
case cbb1.ItemIndex of
-1: ShowMessage('!!!');
0..2: ShowMessage(NamArr[cbb1.ItemIndex]);
//Else...
end;
end;
I'M Fly Like A G6

