VB6 是否短路复杂条件? [英] Does VB6 short-circuit complex conditions?

查看:30
本文介绍了VB6 是否短路复杂条件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

VB6 是否进行短路条件测试?也就是说,我能确定像...这样的声明吗

Does VB6 short circuit conditional tests? That is to say, can I be sure a statement like...

If index <= array_size And array(index) > something Then

永远不会使数组爆裂,无论 index 的值是什么?

will never burst the array, whatever the value of index might happen to be?

推荐答案

不,VB6 的 AndOr 不会短路(这就是为什么短路版本在 VB.net 中称为 AndAlsoOrElse - 向后兼容性).

No, VB6's And and Or don't short-circuit (which is the reason why the short-circuit versions are called AndAlso and OrElse in VB.net — backward compatibility).

这篇关于VB6 是否短路复杂条件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆