What does "Dim" mean in Basic?

OK, most programmers (I believe most of most) of Basic (popular; Visual Basic compiler) know what the use of Dim, but I also believe that you do not know what that word means...

The keywords in Basic are so obvious (different from C#), Using to use a value, Sub to declare a sub-Method, Function for a function, SyncLock to close synchronization on an object, but anyway what is Dim ?

In the other languages, like C#, it's easy to put a var of var iable, in Python a def of def ine or def inition. I found on an ai site that means Dim ension, but, dimension? Is it really dimension or does it have something else?

Author: CypherPotato, 2016-06-30

3 answers

In short, it is a term that was originally created to declare the dimension of arrays and over time has been used for other objects.

The oldest reference I know comes from BASIC where DIM means "dimension".

Was used specifically to determine the dimension of an array.

Over time the use became more comprehensive and began to be used also for other types of variables. Therefore, the original meaning "dimension", currently is not intuitive considering the purpose of use for declaration of various types and not only arrays.

There are attempts at new interpretations such as" declare in memory", due to the fact that with the use of DIM in declarations, the object is allocated in a space in memory. But the original meaning is "dimension", as quoted above.

 12
Author: Daniel Omine, 2016-06-30 06:38:47

O Dim it has multiple meanings assigned to it, the most accepted and oldest being dimension.

Dimension

DIM - (short for dimension) defines the size of arrays.

The original concept of Dim is an abbreviation for dimension, since in the early days of Basic it was used only to define the dimension of arrays.

Nowadays it is known that Dim is used to declare any variable, so this concept no longer fits in the present day, which has led to other interpretations for Dim.

Declare In Memory / Module

DIM - (short for declare in memory / module )

There are sources that say Dimmeans Declare In Memory/Module. This reference is also quite cited, since it was documented by Oracle.

 6
Author: Vinicius Brasil, 2017-10-01 20:03:40

Translated into Portuguese would be an instruction, imperative action of the verb dimensionar.

Would be something like: dimensione, DIM.

 2
Author: zwitterion, 2016-09-06 13:38:09