Quote Originally Posted by Dan_H
It seems silly to even allow implicit variable declarations in code. I am not a programming history buff, but wonder if there is some programmatic historical precedent. Would love to hear members' thoughts on this.
Implicit declarations can assist a programmer in keeping the memory usage of a program down. Implicit declarations allow use of a variable to be similar to the Variant datatype. At one point the variable is an integer type and later the same variable is storing a string.

It seems silly today because there is very little, if any, worry about using up too much memory for a program. In many programming languages, including VB, when a variable is declared the system allocates and reserves memory space for storing data in that variable. The system will not release the memory storage for that variable until either the subtroutine the variable is in terminates or the program itself terminates. Back in the day, memory as well as the processing power of computers was very limited and programmers used every trick they could think of to minimize the footprint of their program. Using a lot of variables could potentially eat up all available memory very quickly, so a programmer would reuse variables (i.e. loop counters, temp variables, etc.) or truncate what data was stored in a variable (i.e. 2-digit years). The limitation of explicit variable declaration is that it has a type and only data of that type can be stored in the variable; with implicit variable declaration a variable is more flexible in how it is reused enabling a programmer to minimize further the number a variables he/she needs for their program.

The Variant type as an explicitly declared type did not exist for early versions of BASIC so the implicit declaration was used instead and the variable became whatever type was needed for what was being stored. These days with the Variant type available and memory not as critical an issue implicit variable declarations are most likely, like JeffB said, merely a compatability feature for older code. Although, I cannot figure why implicit would be the default rather than explicit.