10-03-2009, 11:44 PM
أخي الكريم ضلل case واضغط على F1 لتحصل على الشرح المرفق مع دلفي
و لاستعمال case مع متغير حرفي نستعمل الدالة AnsiIndexText
وهدا مثال
و لاستعمال case مع متغير حرفي نستعمل الدالة AnsiIndexText
وهدا مثال
PHP كود :
procedure TForm1.Button1Click(Sender: TObject);
begin
case AnsiIndexText(Edit1.Text,['one','two','three']) of
0 : ShowMessage('the text is one') ;
1 : ShowMessage('the text is two') ;
2 : ShowMessage('the text is three') ;
end;
end ;

