What does DIM stand for in Visual Basic?
Dimension a variable, basically you are telling the compiler that you are going to need a variable of this type at some point.
Variable declaration. Initially, it was short for "dimension", which is not a term that is used in programming (outside of this specific keyword) to any significant degree.
http://in.answers.yahoo.com/question/index?qid=20090310095555AANmiAZ
Dim originally (in BASIC) stood for Dimension, as it was used to define the dimensions of an array.
(The original implementation of BASIC was Dartmouth BASIC, which descended from FORTRAN, where DIMENSION is spelled out.)
Nowadays, Dim is used to define any variable, not just arrays, so its meaning in not intuitive anymore.
It's short for Dimension, as it was originally used to specify the size of arrays.
Later on it came to be used to declare all kinds of variables, when the possibility to specify the type for variables was added.
It stands for Dimension, but is generally read as "Create Variable," or "Allocate Space for This."
Back in the day DIM reserved memory for the array and when memory was limited you had to be careful how you used it. I once wrote (in 1981) a BASIC program on TRS-80 Model III with 48Kb RAM. It wouldn't run on a similar machine with 16Kb RAM until I decreased the array size by changing the DIM statement
I've found references about Dim
meaning "Declare In Memory", the more relevante is this document form Oracle: http://download.oracle.com/docs/cd/B31104_02/books/VBLANG/VBLANGVBLangRef67.html , Against this, I've heard that if you do not declare the variables in memory where do you do it? May be "Declare in Module" is a good alternative.
In my opinion, "Declare In Memory" may be a mnemonic to learn how to use Dim. I see "Declare in Memory" as a better meaning as it describes what it does in current versions of the language, but probably not the proper meaning.
At the origins of Basic Dim
was only used to declare arrays, also notice that ReDim
resizes arrays. And that it was taken form FORTRAN as Patrick McDonald said in his answer.
Lastly, things means what people think things means, and the more common explanation for Dim
is that it means Dimension
, so let it mean Dimension
.
Really, Does It Matter?