if语句,case语句

1、句式:if...then.判断赋值

例:

if RadioButton1.Checked then
sex:='男'
else if RadioButton2.Checked then
sex:='女'

2、case...of

...

end;

例:

case RadioGroup1.ItemIndex of
0:grade:='优';
1:grade:='良';
2:grade:='中';
3:grade:='差';
end;

 

posted on 2014-10-30 00:29  风云01  阅读(224)  评论(0编辑  收藏  举报