What does "Dim" mean in Basic?

5

OK, most programmers (I think the biggest of the majority) of Basic (popular Visual Basic compiler) know what the use of Dim is, but I also believe they do not know What does that word mean ...

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

In other languages, such as C #, it is easy to put a% of var iable, in Python a% of def ine or def inition. I found on a site that means Dim ension, but, dimension? Is it really dimension or is there something else?

    
asked by anonymous 30.06.2016 / 07:20

3 answers

11

Briefly, it is a term that was originally created for the arrays dimension declaration and was eventually used for other objects.

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

It was used specifically to determine the size of an array.

Over time, the use became more comprehensive and was also used for other types of variables. Therefore, the original meaning "dimension" is currently not intuitive considering the purpose of use for declaring miscellaneous types and not just arrays.

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

    
30.06.2016 / 08:38
6

Dim has multiple meanings assigned to it , being the most accepted and oldest 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 only used to define the dimension of arrays .

Nowadays it is known that Dim is used to declare any variable, so this concept no longer fits these days, which led to other interpretations for Dim .

Declare In Memory / Module

  

DIM - (short for declare in memory / module) >

There are fonts that say Dim means Declare In Memory / Module . This reference is also well quoted since it was documented by Oracle.

    
06.09.2016 / 04:18
2

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

It would be something like: size, DIM.

    
06.09.2016 / 15:38