VB6 beginners tutorial - Learn VB6

Advanced VB6 tutorial - Learn Advanced VB6

VB .NET - Learn Visual Basic .NET

Systems Analysis - System analysis and Design tutorial for Software Engineering

You are here: Visual Basic > Advanced VB6 tutorial > Chapter 20

Removing Integer Overflow Checks, Removing Floating-Point Error Checks

Removing Integer Overflow Checks

This is conceptually similar to array bounds checking. Whereas the programmer determines the upper and lower bounds of arrays, the ranges of the basic data types are set in stone. Whenever you perform any calculations on integer types, VB automatically checks to make sure that the resulting values can still be stored in an integer variable. VB will raise an error code if you try to overstuff an integer variable with a value that it can’t hold.

Just like all the other built-in checks, testing for overflow takes some processing time. If you don’t want to spend time on these checks, you can turn off overflow checking.

Removing Floating-Point Error Checks

This is similar to integer overflow, but applies to the nonintegral data types (that is, singles and doubles). VB’s automatic tests also check for division by zero. If you test your code and are confident that you aren’t performing any disallowed arithmetic actions, you can save the overhead of these tests by deactivating them with this optimization.


<< Previous | Contents | Next >>

Home | About Us | Privacy Policy | Contact Us

Copyright © | All Rights Reserved