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;

原文地址:https://www.cnblogs.com/Michael-D/p/4060994.html