Lesson: the system does not have tens of thousands of dollars.

Source: Internet
Author: User

As a common developer, writeProgramBe careful, especially when controlling statements in key processes. A little bit of negligence is a huge loss. This is not because of your negligence.CodeThe annotation is correct, but the Code does not come up after the if clause. The result logic is completely reversed. What's more serious is that the system is online and tens of thousands of dollars are incorrect, hundreds of customers are involved, which has a bad impact on the company.

If   Not A = B Then
' If A and B are equal
' Doing some thing
Else
' Doing some other thing
End   If

The post-error processing work is very complicated, because the system involves several aspects of interests, this is completely unavoidable, completely caused by your own negligence, the purpose of writing is to remind you to be careful at all times. Do not forget the lessons learned from yesterday, and pay attention to any details when writing a program!

PS: Note that if... when using an else statement, it is recommended that the if statement be followed by the else statement, so that it is not easy to miss the case. A colleague misses a situation because the if statement is not followed by the else statement, the free period is determined to be a non-free period. In fact, this requires us to be comprehensive when thinking about the problem, think about the impact of true, also think about the impact of false, do not leave a potential error.

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.