Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Q&A

Q.Are any performance tricks related to the many data types?
A.One trick when using whole numbers (values with no decimal places) is to use the data type that matches your processor. For instance, most current home and office computers have 32-bit processors. The Visual Basic Integer data type is made up of 32 bits. Believe it or not, Visual Basic can process an Integer variable faster than it can process a Short variable, even though the Short variable is smaller. This has to do with the architecture of the CPU, memory, and bus. The explanation is complicated, but the end result is that you should usually use Integer rather than Short, even when working with values that don’t require the larger size of the Integer.
Q.Are arrays limited to two dimensions?
A.Although I showed only two dimensions, such as intMeasurements(3,1), arrays can have many dimensions, such as intMeasurements(3,3,3,4). The technical maximum is 32 dimensions, but you probably won’t use more than three.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint