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;
时间: 2024-10-19 05:44:59