The colon--bug in VB

Source: Internet
Author: User

About the colon in VB, to many people's impression is: "A line can write a few sentences." That's right, but there is one situation that is not right, that is, in the conditional statement. This is to do a VB project upgrade when encountered, because this problem I checked a good long time program, has been looking for VB in the effect is how to achieve it? Now I find that's a very big bug. I think this is not a programmer's error, it should be a VB syntax loopholes. If there is no understanding of the place to welcome everyone to advise.
Let's look at an example:
1 If Row1 =-1 Then Row1 = 0:if Row2 =-1 Then Row2 =. MaxRows
Our general understanding is to execute the first if statement and then execute the second statement, which should look like this:
If Row1 =-1 Then Row1 = 0
If Row2 =-1 Then Row2 =. MaxRows
But it's not, in fact, in the form below. Such a form is not the result we want.
If Row1 =-1 Then
Row1 = 0
If Row2 =-1 Then Row2 =. MaxRows
End If
I think this syntax for people who are unfamiliar with VB code porting should be a very hidden bug. Hope to be able to help everyone.
This is only my personal opinion, if there are different views of the Welcome to communicate together!

The colon--bug in VB

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.