Visual Basic is now completely on a par with C# and other
languages in its scientific, engineering, and financial number-crunching
capabilities. This chapter demonstrates how easy it is to develop very
fast and powerful, yet easy-to-read code for advanced number-crunching
applications. Some of the recipes will appeal to almost all developers,
such as those demonstrating rounding, the new unsigned integers, and the
Decimal numbers that are suitable
for the most demanding financial calculations. Other recipes will appeal
to the many scientist and engineer types searching for 21st century
updates for FORTRAN, programmable calculators, and Excel.
You want to write compact, efficient code using the latest syntax available for assignment operators.
Sample code folder: Chapter 06\CompactOperators
Visual Basic 2005 now lets you use the same compact assignment notation for some math operations that has been used in the C and C# languages for many years.
There are several compact assignment operators, and they all work the same way. The variable to the left of the operator is used both as a source value and as a destination for the results of the operation. The operators are listed in Table 6-1.