Type coercion

The behavior of type checking has changed between Visual Basic 3 and later versions of Visual Basic. Under Visual Basic 3, if you handed an integer type into a function expecting a string, you got a compile-time error. Under later versions of Visual Basic, the integer is converted to a string at run time and the program continues. This does not present a problem when porting a program from Visual Basic 3, but it does mean that programmers can make a new type of error. The new behavior can manifest itself as hard-to-fix bugs—functions expecting a specific data type to stop working correctly. The problem can be addressed by using explicit variable typing and not using the & and + operators to concatenate and add, respectively.