注册 登录
编程论坛 VB6论坛

求高手指导下,谢谢啦!

陈明2077 发布于 2012-06-06 18:51, 422 次点击
比较下列两段语句,从编码风格的角度分析哪一段好些,并说明好在哪些方面。
程序段一:
if a>b
then
if x>y
then
b=y
else
a=x
end if
else
a=b
end if
程序段二:
/ position_x is the position x of object; position_y is the position y of object; /
if a>b then
  a=b
else
  if position_x>position_y then
    b=position_y
  else
a=position_x
  end if
end if
0 回复
1